摘要: CALayer 1.3D变换中的透视效果,由矩阵中的m34元素控制,用于按比例缩放x、y,以此计算离视角有多远。m34默认值是0,通过设置 m34 = -1.0 / d 来应用透视效果,d代表视角相机与屏幕的距离,单位是像素,其值一般为 500 ~ 1000 例如旋转一个3D方块,使其呈现透视效果。 阅读全文
posted @ 2016-08-01 14:18 Emerys 阅读(109) 评论(0) 推荐(0)
摘要: UIKit Animation 1.属性动画 - (void)changeFrameAnimation { [UIView beginAnimations:@"frameAnimation" context:nil]; [UIView setAnimationDuration:0.8]; [UIVi 阅读全文
posted @ 2016-08-01 14:17 Emerys 阅读(166) 评论(0) 推荐(0)
摘要: CoreAnimation 1.CABasicAnimation // position CABasicAnimation *ba = [CABasicAnimation animationWithKeyPath:@"position"];// boundsCABasicAnimation *ba 阅读全文
posted @ 2016-08-01 14:16 Emerys 阅读(198) 评论(0) 推荐(0)
摘要: 3DTouch 一、主屏按压(Home Screen Quik Actions) 1.静态标签 在info.plist文件中新增项 关键字意义 UIApplicationShortcutItems 数组中的元素就是我们的那些快捷选项标签。 UIApplicationShortcutItemTitle 阅读全文
posted @ 2016-06-21 23:47 Emerys 阅读(390) 评论(0) 推荐(0)
摘要: 在整理以前项目时,对之前对键盘处理不是很满意,今天特意重新写了一个。- (void)becomeObserver { NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; // 键盘通知 [notificationCenter addObserver:self se... 阅读全文
posted @ 2016-05-27 00:08 Emerys 阅读(183) 评论(0) 推荐(0)
摘要: weChat聊天发送图片带有小尖角的实现 1.#import <UIKit/UIKit.h>2.3.@interface JKShapeImage : UIView4.5.@property (nonatomic,strong) UIImage *image;6.7.@property (nonat 阅读全文
posted @ 2016-03-16 08:46 Emerys 阅读(888) 评论(0) 推荐(0)
摘要: 如上图所见,读读日报为广告部分,我们不想看到,所以屏蔽掉。将url在浏览器打开,查看源码,找出广告部分的样式 执行代码: -(void)webViewDidFinishLoad:(UIWebView *)webView{ [web stringByEvaluatingJavaScriptFromSt 阅读全文
posted @ 2016-03-02 23:41 Emerys 阅读(225) 评论(0) 推荐(0)
摘要: // // ViewController.m // socket // // Created by emerys on 16/3/2. // Copyright © 2016年 Emerys. All rights reserved. // #import "ViewController.h" #warning 0000前面四位为消息长度,后接消息,最后以#结束 @interfac... 阅读全文
posted @ 2016-03-02 20:49 Emerys 阅读(195) 评论(0) 推荐(0)
摘要: 问题出现的原因:创建tableView时使用的style是UITableViewStylePlain 解决办法: 在创建tableView时,self.automaticallyAdjustsScrollViewInsets = NO; 官方文档是这么写的: @property(nonatomic, 阅读全文
posted @ 2016-03-02 00:10 Emerys 阅读(2654) 评论(0) 推荐(0)
摘要: scrollView实现轮播 假设现在我们有5张图片需要实现轮播效果,我实现轮播的方法是在第一张图片前插入最后一张,在最后一张后添加第一张,当滚动到添加后的最后一张时,contentoffset.x = screen_w,也就是到了插入前第一张;同理针对插入前的一张。 代码: 1./**2. * @ 阅读全文
posted @ 2016-02-29 10:44 Emerys 阅读(475) 评论(0) 推荐(0)