YourViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"YourViewControllerIdentifier"];
[self.navigationController pushViewController:vc animated:YES];
AccountEditVC *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"AccountEditVC"];
[vc editAccount:tmpAcc];
vc.delegate = self;
[self.navigationController pushViewController:vc animated:YES];
- (void)toMeAgain {
UIViewController *vc = [self.storyboard instantiateViewControllerWithIdentifier:@"myIdentifier"];
[self.navigationController pushViewController:vc animated:YES];
}
NSArray *keys = [dict allKeys];
NSArray *sortedKeys = [keys sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) {
return [(NSString*)obj1 compare:(NSString*)obj2];
}];
for (NSString *key in sortedKeys) {
// your actions
}
__block int i = 10;
void (^block) (int) = ^(int x){
NSLog(@"%d", i); // 11
};
i++;
block (i);
@IBAction func TextGenGo(sender: AnyObject) {
var i:int_least32_t;
var string = outcomeText.string;
for (i=1;i<=textCount.intValue;i++) {
string = string! + String(i) + " ";
}
outcomeText.string = string;
}
import Cocoa
class ViewController: NSViewController {
@IBOutlet var myTextView: NSTextView!
@IBAction func setText(sender: AnyObject) {
myTextView.string = "MyString";
}
}