- 浏览: 95503 次
- 性别:
- 来自: 上海
文章分类
最新评论
-
softlanh:
如果我用第一种方法截取一个不规则图形,截取后只保留需要的截取后 ...
iOS 画出不规则图形 -
netkiller.github.com:
世上竟有Obj-C 这么变态的语言, []的使用都快赶上 pe ...
获取iphone键盘所在view -
374016526:
此功能建议大家不要使用,如果要显示网页的东西还是自定义或UIW ...
UITextView显示HTML内容,实现显示不同的字体和文字颜色 -
qichunren:
在哪里在哪里、
iPhone闹钟
//
// TestBedController_001.m
// PDF_Reader
//
// Created by mir on 11-4-15.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "TestBedController_001.h"
@implementation TestBedController_001
/*
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
// Custom initialization
}
return self;
}
*/
/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
UISwipeGestureRecognizer *recognizer;
recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)];
[recognizer setDirection:(UISwipeGestureRecognizerDirectionRight)];
[[self view] addGestureRecognizer:recognizer];
[recognizer release];
recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)];
[recognizer setDirection:(UISwipeGestureRecognizerDirectionLeft)];
[[self view] addGestureRecognizer:recognizer];
[recognizer release];
recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)];
[recognizer setDirection:(UISwipeGestureRecognizerDirectionUp)];
[[self view] addGestureRecognizer:recognizer];
[recognizer release];
recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)];
[recognizer setDirection:(UISwipeGestureRecognizerDirectionDown)];
[[self view] addGestureRecognizer:recognizer];
[recognizer release];
}
//响应操作绑定的事件
//Java代码
- (void)handleSwipeFrom:(UISwipeGestureRecognizer *)recognizer{
//UISwipeGestureRecognizerDirectionLeft UISwipeGestureRecognizerDirectionRight UISwipeGestureRecognizerDirectionUp UISwipeGestureRecognizerDirectionDown
if (recognizer.direction==UISwipeGestureRecognizerDirectionLeft ) {
NSLog(@"Left");
}
}
/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Release any cached data, images, etc that aren't in use.
}
- (void)viewDidUnload {
[super viewDidUnload];
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
- (void)dealloc {
[super dealloc];
}
@end
发表评论
-
ios自定义framework
2015-07-14 16:33 602ios自定义framework,生成framework后,真 ... -
ios内付费
2015-07-14 16:15 777近年来写了很多IOS的程序,内付费也用到不少,使用IOS的 ... -
UIView 中加入的cocos2d,背景透明
2015-05-11 11:54 1309要点是首先pixelFormat:kEAGLColorForm ... -
CCDataVisitor.h, #include <string> 'string' file not found
2015-03-26 15:55 3296CCDataVisitor.h, #include < ... -
his device is no longer connected.
2015-01-15 15:09 2323his device is no longer connec ... -
idfa检查
2014-05-07 15:29 863cd到工程目录下然后执行下面的命令 grep -r ... -
UIColor 转 16进制颜色值
2014-04-25 15:27 862+ (NSString *)ToHex:(int)tmpid ... -
iOS 富文本控件
2014-04-25 15:24 865使用方式: NSString *t = [NSStr ... -
两个动画效果
2014-04-25 15:19 1019// 心跳动画 + (void)heartbeatView ... -
获取某一个class的私有Api
2014-04-25 15:17 729//知道怎么用私有api,要怎么获得 // ... -
iOS 画出不规则图形
2013-12-13 11:44 8387以下为大家提供一种绘制不规则图形的方法,实现原理利用图像的遮 ... -
关于IOS App唯一标示
2013-11-13 17:18 1337大家都知道苹果对于 ... -
关于IOS,UIViewController屏幕旋转
2013-07-23 15:30 6068关于ios上面旋转的问题,ios6以下我们大家都知道, - ... -
获取iphone键盘所在view
2012-12-13 14:31 1041UIView* kbView = nil; ... -
sqlite for iphone
2012-09-25 17:17 1047iphone开发中sqlite3的操作说明(转载) ... -
ios开发小知识
2012-07-17 14:18 1614ios开发小知识2(转自cc) 退 ... -
UIWebView获取html内容
2012-06-08 22:04 1759获取所有html:NSString *lJs = @&qu ... -
CALayer 缩放动画
2012-05-03 15:31 2657//放大 CAKeyframeAnim ... -
CALayer 按指定的点 运动
2012-05-03 15:30 1345CGMutablePathRef thePath = C ... -
目前最好用的IOS网易微博SDK
2012-04-09 15:36 1330网易微博上的SDK看上去不太明了,小弟这里对其进行了简单的封装 ...
相关推荐
左侧抽屉控制器的导航效果,源码ICSDrawerController,ICSDrawerController 左侧抽屉控制器 包括所需要的基本功能 而且非常小巧 易于定制。 ICSDrawerController is a left-side drawer controller for iPhone (iOS...
Android 竖着的SeekBar 人员列表,聊天的实现,包括图片,语音 通讯录的开发_完整代码 Android_炫酷的3D音乐播放器_各种特效OpenGL Android多媒体 Android音视频的编解码 ...仿iphone的listview下拉更新
Draw on mobile (like android device or iphone) Save the picture (expert image to base64(?)) Collection and reference I. zwibber 难用 有时用手机画会不顺 目前无法调整画面导致有一部分UI在网页外 II. ...
最大的变化是.compact的新displayMode可以在iPhone SE尺寸类设备上复制Apple Maps Behavior。 这是苹果地图抽屉的行为的翻版,为此当currentDisplayMode中的PulleyViewController是.compact那么唯一...
仿iphone 气泡短信 DEMO.rar 仿ireader书架.zip 仿QQ微信登录页面.rar 仿UCWEB界面源码.rar 仿优酷Android客户端图片左右滑动(自动滑动).rar 仿大众点评源码.rar 仿新版人人的效果.zip 传说中的3D播放器.rar 加载...
3.15 如iPhone拖动相片特效 3.16 自制计算器 3.17 关于(About)程序信息 3.18 程序加载中,请稍候 3.19 全屏幕以按钮重写 3.20 今晚到哪儿打牙祭 3.21 Android变脸 3.22 打勾显示输入的密码 3.23 Android多语系支持 ...
3.15 如iPhone拖动相片特效 3.16 自制计算器 3.17 关于(About)程序信息 3.18 程序加载中,请稍候 3.19 全屏幕以按钮重写 3.20 今晚到哪儿打牙祭 3.21 Android变脸 3.22 打勾显示输入的密码 3.23 Android多语系支持 ...
3.15 如iPhone拖动相片特效 3.16 自制计算器 3.17 关于(About)程序信息 3.18 程序加载中,请稍候 3.19 全屏幕以按钮重写 3.20 今晚到哪儿打牙祭 3.21 Android变脸 3.22 打勾显示输入的密码 3.23 Android多语系支持 ...
3.15 如iPhone拖动相片特效 3.16 自制计算器 3.17 关于(About)程序信息 3.18 程序加载中,请稍候 3.19 全屏幕以按钮重写 3.20 今晚到哪儿打牙祭 3.21 Android变脸 3.22 打勾显示输入的密码 3.23 Android多语系支持 ...
3.15 如iPhone拖动相片特效 3.16 自制计算器 3.17 关于(About)程序信息 3.18 程序加载中,请稍候 3.19 全屏幕以按钮重写 3.20 今晚到哪儿打牙祭 3.21 Android变脸 3.22...
3.15 如iPhone拖动相片特效 3.16 自制计算器 3.17 关于(About)程序信息 3.18 程序加载中,请稍候 3.19 全屏幕以按钮重写 3.20 今晚到哪儿打牙祭 3.21 Android变脸 3.22 打勾显示输入的密码 ...
3.15 如iphone拖动相片特效 54 3.16 自制计算器 56 3.17 关于(about)程序信息 58 3.18 程序加载中,请稍候 61 3.19 全屏幕以按钮重写 63 3.20 今晚到哪儿打牙祭 64 3.21 android变脸 67 3.22 ...