摘要: 原生UISlider用作进度条时没有提供单击事件的接口,通过继承在子类中实现单击事件又有杀鸡用牛刀的感觉,于是考虑在Category中实现。创建UISlider+touch.h和UISlider+touch.m文件,添加单击事件方法:1 @interface UISlider (touch)2 // 单击手势3 - (void)addTapGestureWithTarget:(id)target4 action:(SEL)action;5 @end实现原理是为UISlider对象添加UITapGestureRecognizer,当触发tap事件... 阅读全文
posted @ 2013-04-24 16:18 Azure_Sagi 阅读(952) 评论(0) 推荐(0) 编辑
摘要: MPMoviePlayerViewController已经实现了一些通知的监听并对MPMoviePlayerController实现了一些控制,比如: 1. 监听UIApplicationDidEnterBackgroundNotification通知,调用[movieplayer stop],播放器停止。 2. 监听MPMoviePlayerPlaybackDidFinishNotification(调用stop方法或视频播放结束时发送通知)通知,调用dismiss方法移除自身。 阅读全文
posted @ 2012-11-28 15:23 Azure_Sagi 阅读(1709) 评论(0) 推荐(0) 编辑
摘要: SJABHelper.h#import enum { ABHelperCanNotConncetToAddressBook, /**@implementation SJABHelper+ (SJABHelper*)shareControl{ static SJABHelper *instance; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ instance = [[SJABHelper alloc] init]; }); return insta... 阅读全文
posted @ 2012-11-15 11:15 Azure_Sagi 阅读(1266) 评论(1) 推荐(0) 编辑
摘要: 废话不说,先上代码: 1 - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex 2 { 3 switch (buttonIndex) { 4 case 0:{ 5 // 进入搜索页面查询适合岗位。 6 [self.navigationController popToRootViewControllerAnimated:NO]; 7 AppDelegate *appDelegate ... 阅读全文
posted @ 2012-09-29 12:01 Azure_Sagi 阅读(477) 评论(1) 推荐(0) 编辑
摘要: 1 - (NSString *)stringFormDict:(NSDictionary*)dict 2 { 3 NSMutableString *str = [NSMutableString string]; 4 NSArray *keys = [dict allKeys]; 5 for (NSString *key in keys) { 6 if ([[dict objectForKey:key] isKindOfClass:[NSDictionary class]]) { 7 id obj = [dict objectFo... 阅读全文
posted @ 2012-08-30 16:10 Azure_Sagi 阅读(1086) 评论(0) 推荐(0) 编辑