Programming/Swift(93)
-
How to kill your app when it enters background mode
http://pinkstone.co.uk/how-to-kill-your-app-when-it-enters-background-mode/ 홈버튼을 눌러 백그라운드로 갔을 경우 앱을 실행시키지 않는다. 다시 실행하면 앱은 사용했던 화면을 보여주지 않고 새로 시작된다.
2016.07.15 -
navigation bar 배경색상 조절
let nav = self.navigationController?.navigationBar nav?.barTintColor = UIColor(red: 237.0/255.0, green: 237.0/255.0, blue: 242.0/255.0, alpha: 1.0) nav?.tintColor = UIColor(red: 0/255.0, green: 123.0/255.0, blue: 255.0/255.0, alpha: 1.0) nav?.titleTextAttributes = [NSForegroundColorAttributeName: UIColor.blackColor()]
2016.07.06 -
tableView의 cell 안에 2줄이상 사용할 때
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat { // you can also programmatically calculate a desired if(indexPath.section==0) { //첫번째 섹션 일때 return 80 // 셀 크기를 80으로 지정 } else { return 44 } return 0 } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { cell.HomeMenuItemLabel.numberOfLines = 4;..
2016.07.06 -
[ERROR] Error : *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (ViewController) has no segue with identifier ‘loginView''
self.performSegueWithIdentifier("loginView", sender: self)
2016.07.06 -
[ERROR] fatal error: unexpectedly found nil while unwrapping an Optional value
* 원본 소스 let URL = NSURL(string: "https://roads.googleapis.com/v1/snapToRoads?path=-35.27801,149.12958|-35.28032,149.12907")! * 에러 발생fatal error: unexpectedly found nil while unwrapping an Optional value * 해결var stringUrl = "https://roads.googleapis.com/v1/snapToRoads?path=-35.27801,149.12958|-35.28032,149.12907"let URL = NSURL(string: stringUrl.stringByAddingPercentEscapesUsingEncoding(NSUTF8Str..
2016.07.06 -
tableView prototype cell 부분을 보여주지 않으려면
- Remove empty space before cells in UITableViewRemove empty space before cells in UITableView http://stackoverflow.com/questions/18906919/remove-empty-space-before-cells-in-uitableview override func viewDidLoad() { super.viewDidLoad() self.automaticallyAdjustsScrollViewInsets = false // Do any additional setup after loading the view, typically from a nib. }
2016.07.06