摘要:
几个经常需要自定义的组件:UIScrollview、UItextView、UIButton分类: Iphone应用开发 2011-12-28 15:13 136人阅读 评论(0) 收藏 举报为了独立出组件的一些功能,如,为UIbutton切换背景图片,我们经常需要自定义一些组件,下面是我经常用到的,先总结出来,以后会慢慢更新:-:UIScroviewsrollview的事件经常与其子view事件冲突,截断子view事件的相应//传递touch事件- (void)touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event{if(!self.dr. 阅读全文
摘要:
- (void)textViewDidChange:(UITextView *)textView {NSInteger number = [textView.text length];if (number > 128) {UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"提示" message:@"字符个数不能大于128" delegate:self cancelButtonTitle:@"确定" otherButtonTitles:nil];[alert sho 阅读全文