サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Wikipedia
chobikko.hatenablog.com
開発, iPhone, Objectiv-cいつも忘れるので、メモ。NSStringFromCGRectを使う。サンプル CGRect frame = cell.frame; NSLog(@"%@",NSStringFromCGRect(frame)); //出力→{{0, 35}, {320, 201}} ツイートする
開発, iPhone, Objectiv-cこんなふうにPersistentIDをNSStringで保存して //再生中の曲のPersistentIDを取得する MPMediaItem *curItem = [musicPlayer nowPlayingItem]; NSString *s_now_pid = [[NSString alloc] initWithFormat:@"%@",[curItem valueForProperty: MPMediaItemPropertyPersistentID]]; こんなふうにあとで、PersistentIDで検索しようとしたら上手く行かない MPMediaQuery *query = [MPMediaQuery songsQuery]; MPMediaPropertyPredicate * pred; pred = [MPMediaProper
開発, iPhone, Objectiv-c | 17:28ボタンの種類みための違いは、4種類 //ボタンの作成 - UIButtonTypeRoundedRect UIButton *button1 = [UIButton buttonWithType:UIButtonTypeRoundedRect]; [button1 setTitle:@"button1" forState:UIControlStateNormal]; [button1 sizeToFit]; button1.frame = CGRectMake((self.view.frame.size.width - button1.frame.size.width)/2, 30, button1.frame.size.width, button1.frame.size.height); [self.view addSubvie
開発, iPhone, Objectiv-c | 13:32覚え書き if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){ //iphone = UIUserInterfaceIdiomPhone }else { //iPad = UIUserInterfaceIdiomPad } ちなみにUI_USER_INTERFACE_IDIOM()の中身は、、、 #define UI_USER_INTERFACE_IDIOM() ([[UIDevice currentDevice] respondsToSelector:@selector(userInterfaceIdiom)] ? [[UIDevice currentDevice] userInterfaceIdiom] : UIUserInterfaceIdiomPhone)
開発, iPhone, Objectiv-c | 11:38マルチタスクにするにはAppDelegateのヘッダにUIBackgroundTaskIdentifierを追加 @interface AppDelegate_iPhone : NSObject { UIWindow *window; UIBackgroundTaskIdentifier bgTask; //マルチタスク対応 } @property (nonatomic, retain) UIWindow *window; @end AppDelegateのソースに下記メソッドを追加 - (void)applicationDidEnterBackground:(UIApplication *)application { bgTask = [application beginBackgroundTaskWithExpirationH
このページを最初にブックマークしてみませんか?
『chobikko.hatenablog.com』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く