This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private let CellDefaultHeight: CGFloat = 80.0 | |
private let PlaceholderCellIdentifier = "PlaceholderCell" | |
private let ProfileCellIdentifier = "ProfileCell" | |
// MARK: - UITableView Protocol Conformance | |
extension ViewController: UITableViewDataSource { | |
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
if viewModel.shouldShowPlaceholder { | |
return Int(CGRectGetHeight(tableView.bounds) / CellDefaultHeight) | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
view.backgroundColor = .blackColor() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private extension Selector { | |
static let buttonTapped = | |
#selector(ViewController.buttonTapped(_:)) | |
} | |
... | |
button.addTarget(self, action: .buttonTapped, | |
forControlEvents: .TouchUpInside) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private struct Action { | |
static let buttonTapped = | |
#selector(ViewController.buttonTapped(_:)) | |
} | |
... | |
button.addTarget(self, action: Action.buttonTapped, | |
forControlEvents: .TouchUpInside) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
button.addTarget(self, action: #selector(ViewController.buttonTapped(_:)), forControlEvents: .TouchUpInside) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func segmentedControlValueChanged(sender: UISegmentedControl) { } | |
func barButtonItemTapped(sender: UIBarButtonItem) { } | |
func keyboardWillShowNotification(notification: NSNotification) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let button = UIButton(type: .System) | |
button.addTarget(self, action: Selector(“buttonTapped:”), forControlEvents: .TouchUpInside) | |
// ... | |
func buttonTapped(sender: UIButton) { } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void (^)(NSArray *))restorationHandler { | |
return [JLRoutes routeURL:userActivity.webpageURL]; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[JLRoutes routesForScheme:@"https"] addRoute:@"/password/reset/:token" handler:^BOOL(NSDictionary *parameters) { | |
NSString *token = parameters[@"token"]; | |
if (token) { | |
//do my in-app routing to reset screen | |
return YES; | |
} | |
return NO; | |
}]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"applinks": { | |
"apps": [], | |
"details": { | |
"my.apps.bundle.id": { | |
"paths":[ "/password/reset*" ] | |
} | |
} | |
} | |
} |