摘要:
JS对文字进行编码涉及3个函数:escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent 阅读全文
摘要:
CoreData: error: Serious application error. Exception was caught during Core Data change processing. This is usually a bug within an observer of NSMan... 阅读全文
摘要:
- (UIImage *) addTextToImage:(UIImage *) baseImage text:(NSString *)text atRect:(CGRect) rect{ int w = baseImage.size.width; int h = baseImage.size.... 阅读全文
摘要:
使用UIImagePickerController拍照或者视频选择问题cameraUI.mediaTypes = [[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil];kUTTypeImage对应拍照kUTTypeMovi... 阅读全文
摘要:
Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapInfo' (aka 'enum CGBitmapInfo')在使用xcode5 sdk ... 阅读全文
摘要:
ios7下UIBarButtonItem 边距偏大,看起来感觉不是很舒服;搜索方法,得到解决方案如下://////////////////////////////////@interface UINavigationItem (margin)@end@implementation UINavigat... 阅读全文
摘要:
- (UIViewController*)topViewController { return [selftopViewControllerWithRootViewController:[UIApplicationsharedApplication].keyWindow.rootViewContro... 阅读全文
摘要:
- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar searchBar.showsCancelButton = YES; for (UIView *subView in searchBar.subviews) { if... 阅读全文
摘要:
在statusBar 后面添加一层视图方法:在AppDelegate.h 里面定义一个 变量 UIWindow *statusBarBack;在AppDelegate.m里面进行初始化statusBarBack = [[UIWindow alloc]initWithFrame:[UIApplicat... 阅读全文
摘要:
最近在使用xmppframwork来实现一个聊天应用,碰到了一个问题,应用进入后台以后,就接收不到消息了;怎么样才能使应用被切到后台时,应用中的网络连接仍然接收数据并维持存活(像QQ iphone 一样),下面一步一步来分析。针对iOS应用的状态,存在以下三种情况:1)若iOS应用为活动状态... 阅读全文