摘要: 代码如下://选择按钮 NSArray *buttonNames = [NSArray arrayWithObjects:@"今天", @"本周", @"本月", nil]; UISegmentedControl* segmentedControl = [[UISegmentedControl alloc] initWithItems:buttonNames]; [segmentedControl setFrame:CGRectMake(60, 10, 200, 40)]; segmentedControl.selectedSegme 阅读全文
posted @ 2011-10-12 09:08 松花江以南 阅读(2851) 评论(0) 推荐(0) 编辑
摘要: 经常会遇到以下情况,textField被虚拟键盘挡住的情况,解决。RootViewController.h 中:#import <UIKit/UIKit.h>@interface RootViewController : UIViewController<UITextFieldDelegate> { UITextField *textField1; UITextField *textField2; }@property (nonatomic,retain) UITextField *textField1;@property (nonatomic ,retain) UIT 阅读全文
posted @ 2011-10-11 17:49 松花江以南 阅读(15384) 评论(0) 推荐(2) 编辑
摘要: UITextField编辑框经常会遇到关闭虚拟键盘的情况。总结一下,一下的方法。方法一:通过触摸背景关闭虚拟键盘在RootViewController.h中,如下:@interface RootViewController : UIViewController<UITextFieldDelegate> { UITextField *nameTextField; UITextField *numberTextField;}@property (nonatomic ,retain) UITextField *nameTextField;@property (nonatomic,reta 阅读全文
posted @ 2011-10-11 15:55 松花江以南 阅读(4232) 评论(0) 推荐(0) 编辑