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
| import UIKit | |
| class ViewController: UIViewController { | |
| override func loadView() { | |
| print("loadView") | |
| } | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| // Do any additional setup after loading the view, typically from a nib. |
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
| // | |
| // ViewController.swift | |
| // DisplayAlert | |
| // | |
| // Created by cuong on 6/30/17. | |
| // Copyright © 2017 Techmaster. All rights reserved. | |
| // | |
| import UIKit |
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
| import UIKit | |
| class ViewController: UIViewController { | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| self.addBar() | |
| } | |
| func addBar() { |
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
| -(void) printString: (NSString*) msg | |
| onComplete: (void (^)(void)) complete{ | |
| NSLog(@"%@", msg); | |
| complete(); | |
| } | |
| -(void) demoRecursiveBlock | |
| { | |
| __block int index = 0; | |
| NSArray* array = @[@"ABC", @"DEF", @"MNP"]; |
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
| /** | |
| * Created by techmaster on 2/8/17. | |
| */ | |
| /*** | |
| * Calculate factorial of n | |
| * @param n {Number} n must be integer and greater than zero | |
| */ | |
| function factorial(n) { | |
| if (isNaN(n)) { |
NewerOlder