2013年6月3日

根据TextField的高度自动调节弹出键盘高度

摘要: int prewTag ; //编辑上一个UITextField的TAG,需要在XIB文件中定义或者程序中添加,不能让两个控件的TAG相同 float prewMoveY; //编辑的时候移动的高度-(void) textFieldDidBeginEditing:(UITextField *)textField{ CGRect textFrame = textField.frame; float textY = textFrame.origin.y+textFrame.size.height; float bottomY = self.view.frame.size.height-t... 阅读全文

posted @ 2013-06-03 16:38 晏晟 阅读(163) 评论(0) 推荐(0) 编辑

[iOS Dev] 點擊UITextField 跳出UIDatePicker以選取日期(生日,NSDate)

摘要: 這篇文章講的功能 不會自動幫忙移動畫面以顯示原本的 UITextField所以當 UIDatePicker 跳出來的時候 是有可能擋住 UITextField我想應該是有辦法加 但我目前還沒仔細研究首先在 ViewController.h 加上 delegate12345678// 加上 UITextFieldDelegate@interface ViewController : UIViewController <UITextFieldDelegate> {// 例子需要的變數UIDatePicker *datePicker;UITextField *dateTextField; 阅读全文

posted @ 2013-06-03 16:35 晏晟 阅读(307) 评论(0) 推荐(0) 编辑

导航