在Foundation中定义了很多常用结构体类型来简化我们的日常开发NSRange(location length)用来表示范围,分多种情况NSPoint \ CGPoint(开发中常用后者)NSSize \ CGSizeNSRect \ CGRect (CGPint CGSize)NSRange原...
分类:
移动开发 时间:
2015-03-08 16:55:56
阅读次数:
165
//app尺寸,去掉状态栏 CGRect appRect = [UIScreen mainScreen].applicationFrame; NSLog(@"%f, %f, %f,%f",appRect.origin.x, appRect.origin.y, appRect.size.wi...
分类:
移动开发 时间:
2015-03-07 23:58:01
阅读次数:
338
static UIView *modalView;if (modalView) { [modalView removeFromSuperview]; modalView = nil; return; } CGRect screen = [...
分类:
移动开发 时间:
2015-03-06 18:33:11
阅读次数:
311
iOS开发笔记(1)
退回输入键盘:
- (BOOL) textFieldShouldReturn:(id)textField{ [textField resignFirstResponder]; }
CGRect
CGPoint & CGSize
CGPoint aPoint = CGPointMake(...
分类:
移动开发 时间:
2015-03-06 17:12:44
阅读次数:
236
自定义标题栏按钮@implementation SNTitleButton- (id)initWithFrame:(CGRect)frame{ self = [super initWithFrame:frame]; if (self) { //图片居中 sel...
分类:
其他好文 时间:
2015-03-01 23:47:19
阅读次数:
183
高德iOS面试整理(顺序有些乱)
确实挺对不住面试官的,视频面试,我的这边始终没声音。
1.
- (void)testFun
{
CGRect a ;
//…..
}
a的内存在堆上,还是栈上?
2.。 如何把一个 CGRect类型的数据放在堆上去? 你能够想到多少种方法?
3. CGRect a ;
[a retain];
是否能通过编译
4.a...
分类:
移动开发 时间:
2015-03-01 15:45:49
阅读次数:
520
退回输入键盘:?123- (BOOL) textFieldShouldReturn:(id)textField{ [textField resignFirstResponder]; }CGRect?123456CGRect frame = CGRectMake (origin.x, origin.y...
分类:
其他好文 时间:
2015-03-01 13:03:52
阅读次数:
104
(一)要掌握这些的运用NSRange(location length) ---范围 range:范围NSPoint\(相当于)CGPoint ---点NSSize\CGSize ---尺寸NSRect\CGRect (CGPint CGSize) ---相当于一个...
分类:
移动开发 时间:
2015-02-26 17:58:15
阅读次数:
159
#import @interface MyView : UIView@end#import "MyView.h"@implementation MyView-(void) drawRect:(CGRect)rect{ [self drawLine];}#pragma mark - 绘图方法#p...
分类:
其他好文 时间:
2015-02-17 11:37:52
阅读次数:
197
CoreGraphics详解CoreGraphics详解
CoreGraphics绘图
绘制一个矩形
绘制一个椭圆
绘制曲线
绘制圆形
链接点来绘制为图形CoreGraphics绘图绘制一个矩形CGRect rectangle=CGRectMake(0, 0, 200, 200);
//获取当前图形
CGContextRef ctx=UIGraphicsGetCurrentCon...
分类:
其他好文 时间:
2015-02-12 18:38:38
阅读次数:
186