ios UISegmentedControl的使用简介】的更多相关文章

初始化UISegmentedControl NSArray *arr = [[NSArray alloc]initWithObjects:@"轻拍",@"长按",@"清扫",@"旋转",@"捏合",@"拖拽", nil]; //先创建一个数组用于设置标题 UISegmentedControl *segment = [[UISegmentedControl alloc]initWithIt…
前言 NS_CLASS_AVAILABLE_IOS(2_0) @interface UISegmentedControl : UIControl <NSCoding> @available(iOS 2.0, *) public class UISegmentedControl : UIControl, NSCoding UISegmentedControl 的 Items 有两种样式,一种是字符串设置的标题样式,一种是图片设置的样式. 图片设置的样式需要处理图片的渲染模式,以原图显示.处理阴影…
1.UIEvent简介 UIEvent是代表iOS系统中的一个事件,一个事件包含一个或多个的UITouch: UIEvent分为四类: UIEventType typedef NS_ENUM(NSInteger, UIEventType) { UIEventTypeTouches,//触摸事件类型 iOS3.0之后可以用 UIEventTypeMotion,//摇晃事件类型 iOS3.0之后可以用 UIEventTypeRemoteControl,//遥控事件类型 iOS4.0之后可以用 UIE…
在用户使用app过程中,会产生各种各样的事件 iOS中的事件可以分为3大类型:触摸事件.加速计事件.远程控制事件 在iOS中不是任何对象都能处理事件,只有继承了UIResponder的对象才能接收并处理事件.我们称之为“响应者对象” UIApplication.UIViewController.UIView都继承自UIResponder,因此它们都是响应者对象,都能够接收并处理事件 // 当手指开始触摸view // NSArray,字典,NSSet(无序) - (void)touchesBeg…
一 GCD简介 GCD(Grand Central Dispatch)是苹果为实现并发编程提供的新技术.从基本功能上讲,GCD有点像NSOperationQueue,他们都允许程序将任务切分为多个单一任务然后提交至工作队列来并发地或者串行地执行.但是GCD比之NSOpertionQueue更底层更高效. GCD的API很大程度上基于block,当然,GCD也可以脱离block来使用,比如使用传统c机制提供函数指针和上下文指针.实践证明,当配合block使用时,GCD非常简单易用且能发挥其最大能力…
UISegmentedControl * segmentControl = [[UISegmentedControl alloc]initWithFrame:CGRectMake(0, 0, 160, 30)]; segmentControl.tintColor = kMainOrangeColor; [segmentControl insertSegmentWithTitle:@"XX" atIndex:0 animated:NO]; [segmentControl insertSe…
1.CAReplicatorLayer简介 CAReplicatorLayer用于对图层进行复制,包括图层的动画也能复制!可以看着将某一段事务进行重复! #import <QuartzCore/CALayer.h> NS_ASSUME_NONNULL_BEGIN CA_CLASS_AVAILABLE (10.6, 3.0, 9.0, 2.0) @interface CAReplicatorLayer : CALayer //指定图层重复制多少次 @property NSInteger inst…
1.UICoordinateSpace不同坐标空间的坐标切换 @protocol UICoordinateSpace <NSObject> //将当前的坐标空间点转换到指定的坐标空间 - (CGPoint)convertPoint:(CGPoint)point toCoordinateSpace:(id <UICoordinateSpace>)coordinateSpace NS_AVAILABLE_IOS(8_0); //将指定的坐标空间点转换到当前的坐标空间 - (CGPoin…
1.前因 由于剪切图片用到下面方法,此方法属于CGImage.h中,通过创建CGImageRef像素位图,可以通过操作存储的像素位来编辑图片. /* Create an image using the data contained within the subrectangle `rect' of `image'. 截取图像的一个区域重绘图像*/ CG_EXTERN CGImageRef __nullable CGImageCreateWithImageInRect( CGImageRef cg…
1.CATextLayer简介 CATextLayer快速高效简单地来渲染纯文本.NSAttributedString /* The text layer provides simple text layout and rendering of plain * or attributed strings. The first line is aligned to the top of the * layer. */ NS_ASSUME_NONNULL_BEGIN CA_CLASS_AVAILAB…