2012-03-08から1日間の記事一覧
mysqlのdatetime型カラムに対し、phpのdate()で使うには、strtotimeで文字列からdate型に変換しておく必要がある。 $datetime = "2012-03-08 12:23:20"; echo date("Y年m月d日 H:i:s",strtotime($datetime));
NSString *phoneName = [[UIDevice currentDevice] name]; NSString *phoneUniqueIdentifier = [[UIDevice currentDevice] uniqueIdentifier];
my_strに正規表現を使って、文字を切り出したサンプル。パターン定義の(...)を:[match rangeAtIndex:何個目]]で抜ける。 NSRegularExpression *regexp = [NSRegularExpression regularExpressionWithPattern:@"^〒\\d{3}-\\d{4} (.+)" options:0 error:nil…
xcode 非同期処理のため、引き当てた住所をUIラベルで表示する...とかは、住所がセットされるタイミングに注意。 住所は、CLPlacemarkの中のmy_placemark.addressDictionaryの中のvalueForKey:@"FormattedAddressLines"を使用するが、郵便番号があったり、な…
改行の\nや、正規表現の\dとか、表示上では円(¥)記号だが、Xcodeでは「Alt+\」でバックスラッシュ(\)を必ず入れる
TabBarControllerのタブは、segueを繋げた順になってしまうが、TabBarControllerの各タブアイコンをドラッグすると、入れ替えることができる。
StroyBoardで、画面遷移元のViewControllerで「Ctrl+右クリック」し、遷移先に繋げる。modal/push等を選択しておき、プロパティウィンドウの「identify」でsegue名を設定する。 コードの中で、 [self performSegueWithIdentifier:@"segue名" sender:self];
行を選択し、「Ctrl+i」