Gavin.han

致力于移动开发 技术改变生活

导航

2012年10月27日

摘要: 在.m文件中修改方法- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation默认为竖屏:- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return (interfaceOrientation != UIInterfaceOrientationPortrait);//竖屏}修改后为:- (BOOL)shouldAutorotateT. 阅读全文

posted @ 2012-10-27 16:12 gavin.han 阅读(214) 评论(0) 推荐(1) 编辑

摘要: //slider控件值改变- (IBAction)sliderChanged:(id)sender { UISlider *slider = (UISlider *)sender;//用一个UISlider对象来接收sender int intValue = (int)(slider.value); NSString *strValue = [[NSString alloc] initWithFormat:@"%d",intValue];//将int 转化为NSString类型的一种方法 sliderLabel.text = strValue; [strValue rele 阅读全文

posted @ 2012-10-27 14:59 gavin.han 阅读(2257) 评论(0) 推荐(1) 编辑

摘要: 方法一:在button按钮的点击事件中加上[self.textFiled resignFirstResponder];方法二:在xib文件中,可以不在View页面上添加一个View控件 ,一个简单的办法是将View页面的类设置为UIControl(该类继承与UIView).h文件:#import <UIKit/UIKit.h>@interface HomeViewController : UIViewController@property (retain, nonatomic) IBOutlet UITextField *nameField;@property (retain, n 阅读全文

posted @ 2012-10-27 12:46 gavin.han 阅读(261) 评论(0) 推荐(0) 编辑

摘要: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch. self.window.backgroundColor = [U... 阅读全文

posted @ 2012-10-27 12:39 gavin.han 阅读(410) 评论(0) 推荐(0) 编辑