随笔分类 - iOS
摘要:#import -(void)checkDeviceLockScreenState { int notify_token; notify_register_dispatch("com.apple.springboard.lockstate", ¬ify_token,dispatch_get_main_queue(), ^(int token) { ...
阅读全文
摘要:#import @interface TestCell : UITableViewCell @property(nonatomic,copy)NSString *content; /** * 标记行是否被选中 */ @property(nonatomic,assign)BOOL isChecked; @end #import "TestCell.h" @interface TestCe...
阅读全文
摘要:1:自定义Cell中的代码 #import <UIKit/UIKit.h> @interface TestCell : UITableViewCell @property(nonatomic,copy)NSString *content; /** * 标记行是否被选中 */ @property(no
阅读全文
摘要:1:它引入了一种新的概念,抛弃传统意义上我们适配时所谓的具体宽高尺寸,把屏幕的宽和高分别分成两种情况:Compact-紧凑, Regular-正常(Any-任意,其实就是这2种的组合,所以我没分成3种情况).搭配起来是3*3,也就是无论如何变化,加起来也就9种。 2: iPhone4S,iPhone
阅读全文
摘要:__block int timeout = 60; dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0); dispatch_source_t source_t = dispatch_source_create(DISPATCH_SOURCE_...
阅读全文
摘要:@interface ViewController (){ NSLayoutConstraint *yellowViewTopConstraint; NSLayoutConstraint *blueViewLeadConstraint; }@end@implementation Vie...
阅读全文
摘要:模拟器实现3dtouch参考以下网站:http://my.oschina.net/u/2340880/blog/511509- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictio...
阅读全文
摘要:POPAnimatableProperty *prop = [POPAnimatableProperty propertyWithName:@"countdown" initializer:^(POPMutableAnimatableProperty *prop) { ...
阅读全文
摘要://// ViewController.m// NSLayoutAnimationDemo//// Created by ebaotong on 15/7/22.// Copyright (c) 2015年 com.csst. All rights reserved.//#import "V...
阅读全文
摘要:#import @interface TestCell : UITableViewCell@property (weak, nonatomic) IBOutlet UIButton *btnTest;@end#import "ViewController.h"#import "TestCell.h"...
阅读全文
摘要:#import @interface TJShakeProgressView : UIView@property(nonatomic,assign)CGFloat progress;@end//// TJShakeProgressView.m// TJShakeProgressView//// Cr...
阅读全文
摘要:#import @interface TJGradientProgressView : UIView/** * 进度值 */@property(nonatomic,assign) CGFloat progressValue;/** * 开始动画 */- (void)startAnimating;...
阅读全文
摘要:#import @interface TJProgressView : UIView@property(nonatomic,assign)CGFloat progressValue;- (void)showInView:(UIView *)baseView;@end//// TJProgressV...
阅读全文
摘要:1:添加LocalAuthentication.framework框架2:实现过程#import "ViewController.h"#import @interface ViewController ()@end@implementation ViewController- (void)viewD...
阅读全文
摘要:@interface ViewController (){ UIView *firstView; UIView *secondView; UIView *thirdView; }@end@implementation ViewController- (void)v...
阅读全文
摘要:#import "ViewController.h"#import "Masonry.h"#define kWeakSelf(weakSelf) __weak typeof(self)weakSelf = self#define WS(weakSelf) __weak __typeof(&*sel...
阅读全文
摘要:#import @interface TJCircleProgressView : UIView/** * 图标 */@property(nonatomic,strong)UIImage *imgIcon;/** * 进度条值 */@property(nonatomic,assign)CGFlo...
阅读全文
摘要:#import @interface TestCell : UITableViewCell@property (weak, nonatomic) IBOutlet UILabel *testLabel;- (void)parseResult:(NSString *)result;@end#impor...
阅读全文
摘要:#import <UIKit/UIKit.h> @interface SNCircleProgressView : UIView /** * 进度值0-1.0之间 */ @property (nonatomic,assign)CGFloat progressValue; /** * 边宽 */ @p
阅读全文
摘要:转自cocoachina 网友分享:http://mp.weixin.qq.com/s?__biz=MjM5OTM0MzIwMQ==&mid=206637839&idx=7&sn=d5719f4c59753143c288de6d6206832b&scene=5#rd
阅读全文

浙公网安备 33010602011771号