
iOS
_xw_
这个作者很懒,什么都没留下…
展开
-
UITableView 取消选中行高亮
需要点击时高亮一下,松开后,高亮消失,可在- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)newIndexPath的末尾加上[self.tableView deselectRowAtIndexPath:[self.tableView indexPathForSelecte转载 2013-10-25 18:54:13 · 2198 阅读 · 0 评论 -
响应 UIAlertView 按钮事件
{ NSString *alerttitle = NSLocalizedString(@"Alert", nil); NSString *alertmessage = NSLocalizedString(@"Message", nil); NSString *alertcancelbtntitle = NSLocalizedString(@"OK", nil);原创 2013-10-24 19:04:01 · 1281 阅读 · 0 评论 -
UIAlertView 带输入框,且输入框中预先填入字符
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"rename",nil) message:nil delegate:self cancelButtonTitle:NSLocalizedString(@"Cancel",nil) otherButtonTitles:NSLocalizedStrin原创 2013-10-25 18:58:16 · 1249 阅读 · 0 评论 -
ios 监听app从后台恢复到前台
正常情况下,在AppDelegate中实现下面两个方法,能够监听从后台恢复到前台- (void)applicationDidEnterBackground:(UIApplication *)application { log4info(@"---applicationDidEnterBackground----"); //进入后台 } - (void)转载 2013-10-27 13:00:32 · 1091 阅读 · 0 评论 -
ios7 及 iphone5 下uiscrollview中的图片可以上下划动
@interface TConfigViewController (){ UIScrollView *sv;}- (void)viewDidLoad{ [super viewDidLoad]; self.automaticallyAdjustsScrollViewInsets = NO; CGRect mrc = self.view原创 2013-11-06 14:45:19 · 803 阅读 · 0 评论 -
textField 获得及取消焦点
设置当前焦点[self.myTextField becomeFirstResponder]; 取消焦点[self.myTextField resignFirstResponder];原创 2013-11-06 16:09:22 · 5727 阅读 · 0 评论 -
app 启动时直接退出
APP启动时,显示启动画面,显示十多秒后直接退出。ios系统有app启动时间限制,超过一定时间还未完成,系统会把程序kill掉,这样程序就crash。https://developer.apple.com/library/ios/qa/qa1592/_index.htmlA: Why does my application crash during laun原创 2013-11-22 15:50:48 · 1409 阅读 · 0 评论