24/7 twenty-four seven

iOS/OS X application programing topics.

2009-03-17から1日間の記事一覧

UITextFieldのテキストをインデントする

UITextFieldの文字の入力位置を調整する方法です。UITextFieldを継承したクラスを作り、次のメソッドをオーバーライドします。 - (CGRect)textRectForBounds:(CGRect)bounds; - (CGRect)editingRectForBounds:(CGRect)bounds; textRectForBounds:が返す値は…

UITabBarControllerを自動回転に対応させる

UIViewControllerと同じで、継承してshouldAutorotateToInterfaceOrientation:でYESを返します。 #import <UIKit/UIKit.h> @interface MyTabBarController : UITabBarController @end #import "MyTabBarController.h" @implementation MyTabBarController - (BOOL)shouldAut</uikit/uikit.h>…