代码改变世界

UITableView(可滚动到顶部和底部)

2015-08-17 11:05 by 甘雨路, 738 阅读, 0 推荐, 收藏, 编辑
摘要:#import "RootViewController.h"#define width [UIScreen mainScreen].bounds.size.width#define height [UIScreen mainScreen].bounds.size.height#define topH... 阅读全文

通过iOS中的按钮来触发html文件中按钮所触发的函数

2015-08-04 11:07 by 甘雨路, 325 阅读, 0 推荐, 收藏, 编辑
摘要:html文件的代码 1 2 3 4 标题 5 6 7 8 10 11 12 18 iOS 工程的代码#import @interface AppDelegate : UIResponder @prop... 阅读全文

CoreData的增删改查

2015-08-03 10:50 by 甘雨路, 309 阅读, 0 推荐, 收藏, 编辑
摘要:首先使用CoreData创建Demo,勾上CoreData选项 然后创建Entity对象,点击Add Entity(+)按钮 生成Entity对象 重命名双击Entity选项,然后输入Person 设置Person属性,点击Attributes选项中的+号,实现添加属性,并给属性命名,且添加属性相关 阅读全文

旋转的风车(声音越大转速越快)

2015-07-27 21:40 by 甘雨路, 509 阅读, 0 推荐, 收藏, 编辑
摘要:添加AVFoundation.framework库文件1 #import 2 3 @interface AppDelegate : UIResponder 4 5 @property (strong, nonatomic) UIWindow *window;6 7 8 @end 1 #import ... 阅读全文

利用JavaScriptCore实现简单的功能(阶乘)

2015-07-16 10:05 by 甘雨路, 155 阅读, 0 推荐, 收藏, 编辑
摘要:1 #import "RootViewController.h" 2 #import 3 4 @interface RootViewController () 5 @end 6 7 @implementation RootViewController 8 9 - (void)viewDid... 阅读全文

利用JavaScriptCore实现以下简单的功能(平方和)

2015-07-16 09:55 by 甘雨路, 155 阅读, 0 推荐, 收藏, 编辑
摘要:1 #import "RootViewController.h" 2 #import 3 4 @interface RootViewController () 5 @end 6 7 @implementation RootViewController 8 9 - (void)viewDid... 阅读全文

UIScrollView 实现比例缩放

2015-07-14 21:27 by 甘雨路, 420 阅读, 0 推荐, 收藏, 编辑
摘要:1 #import "RootViewController.h" 2 3 @interface RootViewController () 4 { 5 UIImageView *imageView; 6 UILabel *scaleRatioLabel;// 显示倍率用的Labe... 阅读全文

iOS 本地加载js文件

2015-07-13 20:25 by 甘雨路, 1254 阅读, 0 推荐, 收藏, 编辑
摘要:1 #import "RootViewController.h" 2 3 @interface RootViewController () 4 5 @property (nonatomic, strong)UIWebView *webView; 6 7 @end 8 9 @implemen... 阅读全文

UIScrollView现实自动循环滚动

2015-07-07 23:39 by 甘雨路, 734 阅读, 0 推荐, 收藏, 编辑
摘要:1 #import "RootViewController.h" 2 3 #define width [UIScreen mainScreen].bounds.size.width 4 #define heigthY 150 5 #define scrollTime 1 6 7 ... 阅读全文

UIScrollView现实循环滚动

2015-07-07 15:43 by 甘雨路, 178 阅读, 0 推荐, 收藏, 编辑
摘要:1 #import "RootViewController.h" 2 3 #define width [UIScreen mainScreen].bounds.size.width 4 #define heigthY 150 5 6 @interface RootViewController ... 阅读全文