码迷,mamicode.com
首页 >  
搜索关键字:bounds    ( 955个结果
通过颜色生成图片,直接上代码
CGRect rect = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, 64); UIGraphicsBeginImageContext(rect.size); CGContextRef context = UIGraphi.....
分类:其他好文   时间:2016-01-19 10:28:10    阅读次数:148
iOS截图功能
-(UIImage *)captureScreenWithRect:(CGRect)rect{ UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, YES, 1); [self.view.layer renderInCont.....
分类:移动开发   时间:2016-01-19 10:16:44    阅读次数:204
Jan 16 - Search for a Range; Array; Binary Search;
注意index不要出现out of bounds的情况:代码:public class Solution { public int[] searchRange(int[] nums, int target) { int len = nums.length; int ...
分类:其他好文   时间:2016-01-17 06:29:48    阅读次数:182
Masonry等比缩放
第一种:CGFloat width = CGRectGetWidth([[UIScreen mainScreen] bounds]);CGFloat aspectRatio = 1.5;maker.width.equalTo(width);maker.height.equalTo(aspectRat...
分类:其他好文   时间:2016-01-16 11:48:17    阅读次数:131
Frame与启动流程
1. frame与bounds的区别:frame是从屏幕的左上角开始计算位置,而bounds是从新添加view左上角作为(0,0)开始计算bounds是以自身为参考系,所以左上角的点为原点center坐标参照父视图坐标系2. iOS启动流程:从main方法开始:NSStringFromClass([...
分类:其他好文   时间:2016-01-15 16:03:51    阅读次数:157
02-UIScrollView底层实现
UIScrollView底层实现:修改bounds,就等于UIScrollView的contentOffset偏移量#import "ViewController.h" @interface ViewController () @property (nonatomic, weak) UIView *...
分类:其他好文   时间:2016-01-15 06:19:31    阅读次数:195
IOS源码之OC相册,可以循环查看图片
#import "ViewController.h"#import "YZUIScrollView.h"#define kuan ([UIScreen mainScreen].bounds.size.width+20)#define gao [UIScreen mainScreen].bounds....
分类:移动开发   时间:2016-01-13 21:52:03    阅读次数:296
IOS-OC之相册,可以放大,不能循环查看
#import"ViewController.h"#definekuan[UIScreenmainScreen].bounds.size.width#definegao[UIScreenmainScreen].bounds.size.height@interfaceViewController()<UIScrollViewDelegate>@property(weak,nonatomic)IBOutletUIScrollView*huaKuang;@end@implementationViewCo..
分类:移动开发   时间:2016-01-13 00:52:00    阅读次数:375
IOS,Objective-C,相册功能的实现。
#import "ViewController.h"#define kuan [UIScreen mainScreen].bounds.size.width#define gao [UIScreen mainScreen].bounds.size.height@interface ViewContr...
分类:移动开发   时间:2016-01-12 23:06:11    阅读次数:377
移动、尺寸改变
iOS SDK不希望开发者通过修改frame的办法来移动视图,而推荐设置视图的center属性。autoresizesSubviews:当视图的bounds发生变化时,其子视图是否会自动缩放。autoresizingMask:当上级视图的bounds有变化时,本视图应该如何响应。如果视图处在约束系统...
分类:移动开发   时间:2016-01-12 01:08:19    阅读次数:293
955条   上一页 1 ... 48 49 50 51 52 ... 96 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!