Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
whats-open-ios
Commits
9c2dd1ec
Commit
9c2dd1ec
authored
Apr 28, 2017
by
Zach Knox
Browse files
Is this how you make settings in a table view?
Probably not but it works, so ¯\_(ツ)_/¯
parent
c0d795f5
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
WhatsOpen/WhatsOpen/Base.lproj/Main.storyboard
View file @
9c2dd1ec
This diff is collapsed.
Click to expand it.
WhatsOpen/WhatsOpen/FiltersTableViewController.swift
View file @
9c2dd1ec
...
...
@@ -14,6 +14,13 @@ class FiltersTableViewController: UITableViewController {
self
.
dismiss
(
animated
:
true
,
completion
:
nil
)
}
@IBAction
func
showOpenSwitch
(
_
sender
:
Any
,
forEvent
event
:
UIEvent
)
{
print
(
"tick1"
)
}
@IBAction
func
showClosedSwitch
(
_
sender
:
Any
,
forEvent
event
:
UIEvent
)
{
print
(
"tick2"
)
}
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
...
...
@@ -33,23 +40,29 @@ class FiltersTableViewController: UITableViewController {
override
func
numberOfSections
(
in
tableView
:
UITableView
)
->
Int
{
// #warning Incomplete implementation, return the number of sections
return
0
return
1
}
override
func
tableView
(
_
tableView
:
UITableView
,
numberOfRowsInSection
section
:
Int
)
->
Int
{
// #warning Incomplete implementation, return the number of rows
return
0
return
2
}
/*
override
func
tableView
(
_
tableView
:
UITableView
,
cellForRowAt
indexPath
:
IndexPath
)
->
UITableViewCell
{
let cell = tableView.dequeueReusableCell(withIdentifier: "reuseIdentifier", for: indexPath)
let
cell
:
UITableViewCell
switch
indexPath
.
row
{
case
0
:
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"ShowOpen"
,
for
:
indexPath
)
case
1
:
cell
=
tableView
.
dequeueReusableCell
(
withIdentifier
:
"ShowClosed"
,
for
:
indexPath
)
default
:
cell
=
UITableViewCell
()
//this is bad don't let this happen
}
// Configure the cell...
return
cell
}
*/
/*
// Override to support conditional editing of the table view.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment