目的の画像をmyButton.png、1x1透過pngをtransparent.pngとする。 UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"myButton"] style:UIBarButtonItemStylePlain target:aTarget action:anAction]; [item setBackgroundImage:[UIImage imageNamed:@"transparent"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; aViewController.navigationItem.rightBarButtonItem = item; [item rel
I'm guessing I would only use UIKIT_EXTERN if there is a chance of C++ code in my project that may use the variable. Right. This is the primary reason. This happens because C and C++ symbols use different naming conventions. There is a less common reason: UIKIT_EXTERN also specifies default visibility. Note: More generally, "symbol" -- not "variable" since extern could also be applied to constants
スワイプの処理 RootViewController にUIGestureRecognier を左右両方向について登録しておく。 - (void)viewDidLoad { [super viewDidLoad]; : UISwipeGestureRecognizer* swipeGesture = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(didSwipeCell:)]; swipeGesture.direction = UISwipeGestureRecognizerDirectionRight; [self.tableView addGestureRecognizer:swipeGesture]; [swipeGesture release]; swipeGesture = [[UIS
仕事を持つ女性が一段と増えて来ています。 自立する女性が多くその結果、晩婚化や少子化の原因とも言われています。 しかしながら自分で生活して男性に頼らなくてもいいということは、女性のが男性に依存しなくてもいいので自由度が多くなって来たと言えるでしょう。 働きながらでも結婚して仕事を辞める事なくやっていく事も、可能になってきました。 今でもいわゆるマタニティハラスメントと呼ばれるものもあり、妊娠したら辞めるように言われる事もあるみたいですが働きながらでも育児休業を利用している人も多くいるのです。 しかし、そのような環境で勤務されている人もまた少ないのではないでしょうか? 公務員や大企業では、育児休業などもきちんととれると思いますが一般の中小企業では難しいものがあると思います。 今の時代は女性が働ける環境が整っているところは、まだ少ないと思います。 その上この不景気が続いていては、給料が少ないた
I have an app with a UITableView and a corresponding detail view for each row. In the detail view I have to display some text and a background image (text is different for each row, but the image remains the same). The easiest way, in my opinion, is to put the text in an .rtf file and display it in a UIWebView. Then just put a UIImageView behind the UIWebView. I've tried to set the UIWebView's opa
処理が終わったら(サンプルでは2秒間のウェイトが入れてある) contentInsets.top = -60 へ戻してやる。すると最初のヘッダが隠れた表示に戻る。なお contentInsets も UIViewアニメーションの対象なので +[UIView animateWithDuration:aniamations:] を使うとヘッダが隠れるまでがアニメーションになる(逆に使わないと一瞬で切り替わり、やや不自然になる)。 コードではヘッダの表示制御用にメソッドを用意してある。こんな感じ。 - (void)_setHeaderViewHidden:(BOOL)hidden animated:(BOOL)animated { CGFloat topOffset = 0.0; if (hidden) { topOffset = -self.headerView.frame.size.heig
プッシュ通知を実装するときに、「バックグラウンドで通知受けたときはapplication:didFinishLaunchingWithOptions:とapplication:didReceiveRemoteNotification:、どっちが呼ばれるんだっけ?」とかなんだかいつも自信なくなってきてドキュメントを見返したりしてしまうので、ドキュメントと、実際の動作を確認した内容をまとめておきます。 (参考ドキュメント) Local Notification および Push Notification プログラミングガイド(日本語) (英語・最新版) アプリがバックグラウンドで動作中に通知が配信された場合の挙動 この場合、システムは、警告の表示、アイコンのバッジの表示、また、サウンドの再生を行う ことで通知を提示します。 アクションボタンがタップされると、システムはアプリケーションを起動しま
Persistent rightBarButtonItem Property of UINavigationItemに書かれていることがやりたくてUINavigationControllerDelegateのnavigationController:willShowViewController:animated:を使おうとしたんだけど、navigationController.visibleViewControllerがすでに新しい表示先であるviewControllerを指してしまってたので直前に表示されていたUIViewControllerを参照できなかった。 ^1 というわけで、push/popの前後のvisibleViewControllerを別途参照できるようにサブクラスを作った。 これを使うとnavigationController.outgoingViewController
TwitterでViewライフサイクルについて話題になったので、まとめてみました。 @tomohisa @gaolay @replicantnexus6 @t_okada これまではiOS5では呼ばれてましたね。5ではwillUnloadっていう使いドコロのわからないメソッドも追加されてそれも呼ばれてましたし。 — kishikawa katsumiさん (@k_katsumi) 9月 20, 2012 シングルビューの動作 こちらが基本となります。よく勘違いされているのは、ViewDidUnloadは、いつもViewが閉じるときに呼ばれるというものですが、これは間違いで、通常、ViewDidUnloadは呼ばれません。 モーダルビューが呼ばれたとき モーダルビューが呼ばれたときの注意点は、裏にあるビューは、一度UIWindowから削除されて、ViewDidDisappearが走るという点
Full Source code: https://github.com/boctor/idev-recipes/tree/master/RaisedCenterTabBar Problem: Apps like Instagram, DailyBooth and Path™ have what looks like a standard UITabBarController, but the center tab bar is raised or colored. How do we recreate this look? Solution: These tab bars look pretty standard with the exception of the center item, so we’ll start out with a standard UITabBarContro
米Twitterは7月1日、Mac OS X向けのUI開発フレームワーク「TwUI 0.1」を公開した。Mac OS Xの「Core Animation」機能を利用するUIフレームワークで、iOS向けアプリケーションで利用されている「UIKit」に近い感覚でMac OS X向けアプリケーションを開発できる。 TwUIは、Twitterが提供するMac OS X向けの公式クライアント「Twitter」(旧名称はTweetie)で利用されているフレームワーク。iOS向けのUIフレームワーク「UIKit」の哲学をデスクトップ向けに適用したもの、と開発チームは説明している。UIKitはCore Animationを利用しており、CPUではなくGPUを用いたハードウェアアクセラレーションを利用できる点が特徴となる。TwUIを利用すると、iOS開発者は慣れ親しんだMVCモデルでUIを開発できるという。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く