This file contains 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
#include <iostream> | |
#include <cstdio> | |
#include <algorithm> | |
#include <fstream> | |
using namespace std; | |
struct Legit { | |
string city; |
This file contains 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
// This can all be done from the parent VC--AddSearchRegionsViewController is child | |
AddSearchRegionsViewController *addSearchRegionsVC = [[AddSearchRegionsViewController alloc] initWithNibName:@"BaseTableView" bundle:[NSBundle mainBundle]]; | |
UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Test" style:UIBarButtonItemStyleBordered target:self action:@selector(didPressBackButtonOnAddSearchRegionsVC)]; | |
addSearchRegionsVC.navigationItem.backBarButtonItem = backButton; | |
[self.navigationController pushViewController:addSearchRegionsVC animated:YES]; | |
-(void)didPressBackButtonOnAddSearchRegionsVC { |
This file contains 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 disposeBag = DisposeBag() | |
func doSomethingRx() -> Observable<String> { | |
return Observable.create { observer in | |
observer.onNext("We're using RxSwift!") | |
return Disposables.create() | |
} | |
} |
This file contains 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 doSomethingClosure(_ completed: ((String) -> Void)) { | |
completed("We're using closures.") | |
} | |
doSomethingClosure { result in | |
print("result: \(result)") | |
} | |
// prints "result: We're using closures." |