Gavin.han

致力于移动开发 技术改变生活

导航

上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页

2012年10月31日

摘要: 简单的显示Google地图添加MapKit.Framework框架HomeViewController.h code:#import <UIKit/UIKit.h>#import <MapKit/MapKit.h>@interface HomeViewController : UIViewController{ MKMapView *map;}@endHomeViewController.m code:#import "HomeViewController.h"@interface HomeViewController ()@end@implemen 阅读全文

posted @ 2012-10-31 13:35 gavin.han 阅读(581) 评论(0) 推荐(0) 编辑

摘要: 新建Empty Application,添加HomeViewControllerHomeViewController.h代码#import <UIKit/UIKit.h>#import <MediaPlayer/MediaPlayer.h>@interface HomeViewController : UIViewController{ MPMoviePlayerViewController *playerViewController;}- (IBAction)buttonClicked:(id)sender;@endHomeViewController.m代码#imp 阅读全文

posted @ 2012-10-31 13:20 gavin.han 阅读(444) 评论(0) 推荐(0) 编辑

2012年10月30日

摘要: 新建Empty Applicaton,添加HomeViewController文件。还是看代码吧,将理论太枯燥,理论在代码中会提到。HomeViewController.h代码:#import <UIKit/UIKit.h>#import <AVFoundation/AVFoundation.h>@interface HomeViewController : UIViewController<AVAudioRecorderDelegate, AVAudioPlayerDelegate>{}@property (nonatomic, retain) AVAud 阅读全文

posted @ 2012-10-30 22:28 gavin.han 阅读(9298) 评论(0) 推荐(1) 编辑

摘要: ios 音频的播放使用到AVFoundation框架。其包含三个主要的类:AVAudioPlayer、AVAudioRecorder和AVAudioSession。它们负责音频的播放、录制和配置,而且都有相对应的delegate协议。支持的格式有:caf/m4a/mp3/aif/wav/au/snd/aac.能够提供基本的播放操作:创建、准备、播放、暂停、跳过和停止,并且支持多个AVAudioPlayer对象的使用。支持音量调节控制、循环播放和左右声道设置等。 AVAudioPlayerDelegate协议有以下重要方法: audioPlayerBeginInterruptio... 阅读全文

posted @ 2012-10-30 20:55 gavin.han 阅读(5252) 评论(1) 推荐(0) 编辑

2012年10月29日

摘要: 一、使用NSTimer实现动画1.新建empty AppLication,添加HomeViewController页面, iphone.png图片2.在HomeViewController.xib中添加Image View,并调整其大小;再添加一个Slider控件3.HomeViewController.h代码:#import <UIKit/UIKit.h>@interface HomeViewController : UIViewController{ CGPoint delta;//坐标变化量 NSTimer *timer; CGSize picSize;//图片大小 }@pr 阅读全文

posted @ 2012-10-29 21:55 gavin.han 阅读(5007) 评论(0) 推荐(1) 编辑

摘要: 一、在Firefox中打开sqlite3(如果没有,选择工具->附加组件,添加即可)新建sqlite3数据库,Contacts,建立一个members表,字段 id,integer,主键,自增;name,varchar;email,varchar,null;birthday,datetime,null。向表中添加一些数据:二、新建Empty Appliation,添加一个HomeViewController,和一个组件libsqlite3.dylib,来支持对sqlite3的连接,关闭,增删改查等操作。1.HomeViewController.h代码:#import <UIKit/ 阅读全文

posted @ 2012-10-29 13:12 gavin.han 阅读(21245) 评论(2) 推荐(0) 编辑

2012年10月28日

摘要: 通过plist文件存取文件在ios文件处理(一)的项目中,修改HomeViewController.m的viewDidLoad方法- (void)viewDidLoad{/* NSString *fileName = [[self documentsPath] stringByAppendingPathComponent:@"content.txt"]; //NSString *fileName = [[self tempPath] stringByAppendingPathComponent:@"content.txt"]; [self writeTo 阅读全文

posted @ 2012-10-28 17:10 gavin.han 阅读(489) 评论(0) 推荐(0) 编辑

摘要: 一.在Documents、tmp和Library中存储文件Documents:用于存储应用程序中经常需要读取或写入的常规文件。tmp:用于存储应用程序运行时生成的文件。(随着应用程序的关闭失去了利用价值)Library:一般存放应用程序的配置文件,比如说plist类型的文件。二.读取和写入文件 1.新建Empty Application应用程序,添加HomeViewController文件HomeViewController.h代码:#import <UIKit/UIKit.h>@interface HomeViewController : UIViewController{ }- 阅读全文

posted @ 2012-10-28 16:19 gavin.han 阅读(1474) 评论(2) 推荐(2) 编辑

摘要: 通过两种方法来实现:一、通过动态数组NSMutableArray中的数据,来显示数据1.新建Empty Application项目,新建ViewController,HomeViewController,在AppDelegate.m中导入该文件,并在方法- (BOOL)application:didFinishLaunchingWithOptions:中添加以下红色标记的代码- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ . 阅读全文

posted @ 2012-10-28 13:06 gavin.han 阅读(9866) 评论(0) 推荐(2) 编辑

2012年10月27日

摘要: 在.m文件中修改方法- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation默认为竖屏:- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{ return (interfaceOrientation != UIInterfaceOrientationPortrait);//竖屏}修改后为:- (BOOL)shouldAutorotateT. 阅读全文

posted @ 2012-10-27 16:12 gavin.han 阅读(214) 评论(0) 推荐(1) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 下一页