IOS 开发遇到的问题
2014-05-07 15:08
204 查看
1.whose
view is not in the window hierarchy
Where are you calling this method from? I had an issue where I was attempting to present a modal view controller within the viewDidLoadmethod.
The solution for me was to move this call to the
viewDidAppear:method.
My presumption is that the view controller's view is
not in the window hierarchy at the point that it has been loaded (when the
viewDidLoadmessage
is sent), but it is in the window
hierarchy after it has been presented (when the
viewDidAppear:message
is sent).
2.TableView
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView //表示一共有多少段,所谓段就好比通讯录中A-Z这么来区分用户组,这个段就是一个字母. 你希望你的TABLE有多少个HEADER就有多少个 section- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
//每个section有多少行,比如你通讯录中以A开头的联系人有2个,就是2
- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
//每一段的头部的样式,自己定义,加个图片,价格LABEL都行
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
//每一段头部的高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
//每一段中的每一行的高度
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
//每一段中的每一行的样式,可以自己定义
// indexPath.section 来确定是哪个段, indexPath.row来确定哪个行
3.Receiver 'NSManagedObjectContext' for class message is a forward declaration
来自stackoverflow的解答:You must import CoreData/CoreData.h in the file Supporting Files/YourApp-Prefix.pch:
#ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> #endif
4.使用SDWebImage和MKNetworkKit要注意
使用SDWebImage一定要在项目的Build Phases的Link Binary With Libraries里面加入MapKit.framework使用MKNetWorkKit要加入CFNetwork.framework
5.'libxml/tree.h' file not found
Build Settings中的Search Path中的Header Search Paths 该为 ${SDKROOT}/usr/include/libxml2相关文章推荐
- 分享 Ionic 开发 Hybrid App 中遇到的问题以及后期发布 iOS/Android 的方方面面
- [HAXE] haxe接入IOS版FacebookSdK以及iOS开发遇到的问题总结(二)
- iOS开发遇到的问题
- iOS开发中使用SCRecorder进行视频裁剪遇到的问题
- iOS 开发 APP集成微信分享功能遇到的问题-2016-10月
- iOS开发 Xcode8中遇到的问题及改动
- iOS开发中遇到的头文件找不到的问题解决办法
- iOS 开发中你是否遇到这些经验问题(二)
- iOS开发中使用protobuf遇到的一些问题
- IOS开发遇到的问题和解决方法
- iOS开发中解析JSON中的boolean类型的数据遇到的问题
- iOS 开发过程遇到的问题汇总
- ios生命周期开发中遇到的问题
- ios开发 CLLocationManager获取位置信息时遇到的一个小问题
- iOS_开发中遇到的那些问题_5
- [iOS开发]使用GCD遇到的问题
- ios开发过程遇到问题总结
- iOS开发:iOS10.2手机系统打开相册遇到的各种显示英文文字的问题
- iOS 开发中你是否遇到这些经验问题(一)
- iOS 开发遇到问题