随笔分类 -  iOS开发

摘要:被问到了一个问题:如何从一个子视图或者一个View中刷新其他UITableView,常规的写法可能是这样的TestTVC*testTVC =[[TestTVC alloc] init];[testTVC loadData];这时你可以看看UITableView是不会被刷新的,起码cellForRowAtIndexPath是不会运行的,为什么呢?因为对TestTVC这样init实际是重新init了一... 阅读全文
posted @ 2015-02-25 19:06 xxd 阅读(789) 评论(0) 推荐(0) 编辑
摘要:如果当前是个VC,那么就太简单了,直接就可以push到下一个vcAddShopViewController *controller = [[AddShopViewController alloc] init];controller.view.backgroundColor = [UIColor wh... 阅读全文
posted @ 2015-02-24 21:21 xxd 阅读(2354) 评论(0) 推荐(0) 编辑
摘要:使用ASIHTTPRequest来实现用户登录,但是无论如何登陆的用户总是同一个- (IBAction)signin:(id)sender{……..ASIFormDataRequest *request = [ASIFormDataRequestrequestWithURL:loginUrl];[request setDelegate:self];[request setRequestMethod:@"POST"];[request setPostValue:username.text forKey:@"username"];[request setPo 阅读全文
posted @ 2012-08-15 15:14 xxd 阅读(2546) 评论(1) 推荐(1) 编辑
摘要:一般Objective-C的代码都在Xcode中调试,今天实验了下如何在命令行模式下运行,还是比较简单的,记录分享一下。 阅读全文
posted @ 2012-06-07 09:32 xxd 阅读(2994) 评论(1) 推荐(0) 编辑
摘要:Objective-C中调用函数的方法是“消息传递”,这个和普通的函数调用的区别是,你可以随时对一个对象传递任何消息,而不需要在编译的时候声明这些方法。所以Objective-C可以在runtime的时候传递人和消息。首先介绍两个方法 SEL和@selector根据AppleObjective-C Runtime Reference官方文档这个传递消息的函数就是id objc_msgSend(id theReceiver,SEL theSelector, …)theReceiver是接受消息的对象类型是id,theSelector是消息名称类型是SEL。下边代码我们来看看如何来生成一个SEL, 阅读全文
posted @ 2012-04-10 10:25 xxd 阅读(60110) 评论(1) 推荐(3) 编辑
摘要:继续《iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (3) 深入Segue,Class,Protocol,Delegate的基本使用》的内容,如果想从头学习Storyboard,请参考《iOS 5 Storyboard 学习之 UITableViews》1 我们来建立最后一个TableViewController,用来控制类别的选择。托一个“Table View Controller”,从类别 Control+Drog 到新的“Navigation Controller”上然后选择“Push”,Segue的identi 阅读全文
posted @ 2012-03-13 15:23 xxd 阅读(3839) 评论(1) 推荐(1) 编辑
摘要:继续《iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (2)》的内容,如果想从头学习Storyboard,请参考《iOS 5 Storyboard 学习之 UITableViews》1 首先我们添加一个“添加按钮” 2 随后托一个“Table View Controller”,然后配置它然后embed in Navigation Controller 从左上角的加号按钮 Control+Drog 到新的“Navigation Controller”上然后选择Modal 把这个Segue的Identifier设置成“Add 阅读全文
posted @ 2012-03-12 15:26 xxd 阅读(9967) 评论(2) 推荐(1) 编辑
摘要:迁移项目必然要遇到旧的库在新的环境下水土不服的情况,首先遇到的难题是ASIHttpRequest。Stackoverflow上找到了一个答案,如下:It's very easy to use asi-http-request in an ARC environment without changing anything, simply follow these steps:Simply create a static library target.Add asi-http-request files as required to the library targetConfigure 阅读全文
posted @ 2012-03-11 22:30 xxd 阅读(10190) 评论(0) 推荐(0) 编辑
摘要:继续《iOS 5 Storyboard 学习之 Tabbar Controller,Navigation Controller (1)》的内容,如果想从头学习Storyboard,请参考《iOS 5 Storyboard 学习之 UITableViews》1 建立文件“ PlayersViewController”记得选择”UITableViewController“2 选择“Table View Controller”设置“Identity Inspector”的Class为“PlayersViewController”编辑“ PlayersViewController.h”,建立一个可修改 阅读全文
posted @ 2012-03-09 15:50 xxd 阅读(9772) 评论(16) 推荐(0) 编辑
摘要:1 首先建立一个项目,随便起一个名字。2 点击“MainStoryboard.storyboard”,从“Object Library”托一个”Tab Bar Controller“进来: 3 点击“Tab Bar Controller” 在“Attributes Inspector”中选择“Is Initial View Controller”:然后可以看到“Tab Bar Controller” 的右边多了一个箭头4 删除上边的“ View Controllers - Item 1”,托一个“Table View Controller“进来 5 点击“Table View Controll 阅读全文
posted @ 2012-03-07 16:14 xxd 阅读(14249) 评论(1) 推荐(2) 编辑
摘要:用到的技术:UITableView,Navigation Controllers,Storyboard Push文章内容只是把关键的地方在文中讲解了一下,完整的代码在文章最后,请下载对比自己的代码。1 建立一个项目 “StoryboardUITableViews”,选择Single View Application2 点击“MainStoryboard.storyboard” 选择“Editor > Embed In > Navigation Controller” 会出现一个Navigation Controllers3 在右边的View Controller上放置一个Table 阅读全文
posted @ 2012-03-06 11:19 xxd 阅读(18525) 评论(23) 推荐(0) 编辑

点击右上角即可分享
微信分享提示