- 博客(9)
- 收藏
- 关注
原创 UIScrollView 自适应高度
NSDictionary *fontDic = [NSDictionary dictionaryWithObjectsAndKeys:[UIFont systemFontOfSize:17],NSFontAttributeName, nil]; CGRect rect = [movie.plot_simple boundingRectWithSize:CGSizeMake(375, 0...
2019-04-11 10:09:27 203
原创 UIActionSheet and UIAlertView
- (IBAction)buttonPressed:(id)sender { UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Are you sure?" delega
2015-08-13 21:18:34 197
原创 扩充
//这个方法是UITableviewCell的子类状态改变时调用,可以用在在编辑时对cell进行设置- (void)didTransitionToState:(UITableViewCellStateMask)state{ [super didTransitionToState:state];}
2015-08-11 20:05:20 81
原创 触摸和摇一摇
- (void)click:(UIButton *)button{ [self.myTextField becomeFirstResponder]; NSLog(@"测试点击方法是否执行");}// 摇一摇- (void)motionBegan:(UIEventSubtype)motion withEvent:(UIEvent *)event{ NSLog
2015-08-08 21:24:35 197
原创 给头视图添加个伸缩动画
self.imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"4.jpg"]]; self.imageView.frame = CGRectMake(0, -200, self.view.frame.size.width, 200); // 给tableView添加头视图// 宽是
2015-08-08 20:59:32 211
原创 视图切换
// 跳转到下个视图控制器[self presentViewController:loginVC animated:YES completion:^{ }];// 撤销当前的视图控制器- (void)click{ [self dismissViewControllerAnimated:YES completion:^{ }];}
2015-08-05 08:57:59 79
原创 让在下面的文本框在弹出键盘时不会被挡住
(BOOL)textFieldShouldBeginEditing:(UITextField *)textField {[self.confirmPassword setText:@”“]; if (textField.frame.origin.y > HEIGHT / 2) { CGFloat height = textField.frame.origin.y - HEIGHT /
2015-08-05 08:54:13 178
原创 UI常忘记的控件使用方法
1.设置清空符号self.inputName.clearButtonMode = UITextFieldViewModeAlways;self.inputName == UITextField2.编辑返回键 // 需要签订 并且设置代理人的属性#define HEIGHT self.view.frame.size.height- (BOOL)textFieldShouldReturn:(UIT
2015-08-01 12:59:36 226
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人