2015-10-19から1日間の記事一覧
iOS8の変更点 iOS8~らしいのだがNSCalendarの書き方が少し変わってたのでメモ NSYearCalendarUnit -> NSCalendarUnitYear NSCalendarUnitMonth ->NSMonthCalendarUnit NSCalendarUnitDay ->NSDayCalendarUnit NSCalendarUnitHour ->NSHourCalendarUnit など…
iOS9 で sendAsynchronousRequest:queue:completionHandler がDeprecatedになってました NSURLSessionのdataTaskWithRequestまたはdataTaskWithURLに移行していきましょう。 NSURLSessionはiOS7から使えるようです。 NSURLSessionはシングルトンで呼ばなけれ…
特定のViewのAutoLayoutの解除のかき分け Objective-Cの場合 centerView.translatesAutoresizingMaskIntoConstraints = NO; Swiftでは、setterメソッドを使った書き方 [centerLabel setTranslatesAutoresizingMaskIntoConstraints:NO];
CodeでAutoLayout制御 Viewを中央に表示 // サイズ指定して生成 UILabel *centerLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 100, 20)]; centerLabel.text = @"center"; // Layout制約を決める前にaddSubviewを先にコール [self.view addSubvi…