iOS????-???????????????
???????????? ???????[ 2015/2/26 15:27:22 ] ????????iOS ???? ????
?? 1.????????
????iOS??????7.0??????API??????????????????????StatusBar??????Ч???
??????з???
????[[UIApplication sharedApplication] setStatusBarHidden:YES];
???????????????????汾???Ч?????????????????μ?API????????????????????????£?
????-(BOOL)prefersStatusBarHidden
????{
????return YES;
????}
????2.????????????????????
?????????????????????????κ???????????????????NumberPad???return????
????????????ScrollerView???в????????????ScrollerView????????Ч????
???????????£?
@implementation TestViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[_scrollView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(hideKeyboard)]];
}
-(void)textFieldDidBeginEditing:(UITextField *)textField{
//???????216
[_scrollView setFrame:CGRectMake(0?? 0?? _scrollView.frame.size.width?? _scrollView.frame.size.height+216)];
[_scrollView setContentOffset:CGPointMake(0?? 100) animated:YES];
[_scrollView setTag:0];
}
-(void) hideKeyboard{
if(_scrollView.tag==0){
[_scrollView setContentOffset:CGPointMake(0?? 0) animated:YES];
[_scrollView setFrame:CGRectMake(0?? 0?? _scrollView.frame.size.width?? _scrollView.frame.size.height-216)];
[self.view endEditing:YES];
[_scrollView setTag:1];
}
}
}
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11