一、自定义层的方法1
方法描述:创建一个CALayer的子类,然后覆盖drawInContext:方法,使用Quartz2D API进行绘图
1.创建一个CALayer的子类
2.在.m文件中覆盖drawInContext:方法,在里面绘图
1 @implementation MJLayer
2
3 #pragma mark 绘制一个实心三角形...
分类:
其他好文 时间:
2015-07-14 10:05:54
阅读次数:
124
ios内购实现代码如下():#import "ViewController.h"#import @interface ViewController ()//记录产品列表@property(nonatomic,strong)NSArray*allProducts;@end@implementation...
分类:
移动开发 时间:
2015-07-13 20:27:15
阅读次数:
142
首先新建一个appdelegate的分类代码如下:#import "AppDelegate.h"
@interface AppDelegate (DismissKeyboard)
/** 开启点击空白处隐藏键盘功能 */
- (void)openTouchOutsideDismissKeyboard;
@end
@implementation AppDelegate (DismissKeyboard...
分类:
其他好文 时间:
2015-07-13 14:06:32
阅读次数:
125
#import @interface user : NSObject@property(nonatomic,copy)NSString* name;@property(nonatomic,copy)NSString* age;@end#import "user.h"@implementation u...
分类:
其他好文 时间:
2015-07-13 11:41:32
阅读次数:
128
有时一些小的需求,其实只是需要得知当前IOS APP使用的地点,有些只是想精确到城市级别,并不需要任何地图。
有了以下的简易实现:
@interface MainViewController ()CLLocationManagerDelegate>
....
@end
@implementation MainViewController
- (void...
分类:
移动开发 时间:
2015-07-13 10:19:26
阅读次数:
182
有时一些小的需求,其实只是需要得知当前IOS APP使用的地点,有些只是想精确到城市级别,并不需要任何地图。有了以下的简易实现:@interfaceMainViewController ()....@end@implementation MainViewController- (void)InitL...
分类:
移动开发 时间:
2015-07-13 10:05:34
阅读次数:
135
Test Precisely and ConcretelyKevlin Henney
IT IS IMPORTANT TO TEST for the desired, essential behavior of a unit of code, rather than for the incidental behavior of its particular implementation. But...
分类:
其他好文 时间:
2015-07-10 15:20:08
阅读次数:
119
#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additio.....
分类:
移动开发 时间:
2015-07-10 14:51:37
阅读次数:
180
XMLDOM1、创建XML 解析器: (解析XML文件、解析XML字符串) xmlDoc=new ActiveXObject("Microsoft.XMLDOM"); //Internet Explorer xmlDoc=document.implementation...
分类:
其他好文 时间:
2015-07-09 17:42:51
阅读次数:
82
SELinux (Security-Enhanced Linux) in Fedora is an implementation of mandatory access control in the Linux kernel using the Linux Security Modules (LSM...
分类:
系统相关 时间:
2015-07-09 00:14:25
阅读次数:
174