摘要: 首先要加入两个Frameworks,#import <AVFoundation/AVFoundation.h>#import <AudioToolbox/AudioToolbox.h>然后在Storyboard对App界面进行以下的设计,在PlayerViewController.h添加以下代码,主要是连接Outlets ,Target-Actions 和实现AVAudioPlayerDelegate.#import <UIKit/UIKit.h>#import <AVFoundation/AVFoundation.h>#import < 阅读全文
posted @ 2012-08-24 19:05 PH 阅读(1925) 评论(0) 推荐(0)
摘要: 添加edit bar button item 与添加add bar button item 有所不同, 可以直接使用self.editButtonItem下面是详细的代码: - (void)viewDidLoad{ [super viewDidLoad]; self.tableViewMain.delegate=self; self.tableViewMain.dataSource=self; UIBarButtonItem *add=[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarB... 阅读全文
posted @ 2012-08-16 21:35 PH 阅读(1087) 评论(0) 推荐(0)
摘要: 1 -(void)openXMLFile2 {3 NSString *path=[[NSBundle mainBundle] pathForResource:@"persons" ofType:@"xml"];4 NSURL *url=[NSURL fileURLWithPath:path];5 6 self.parser=[[NSXMLParser alloc] initWithContentsOfURL:url];7 self.parser.delegate=self;8 [self.parser parse];9 } 阅读全文
posted @ 2012-04-18 23:05 PH 阅读(147) 评论(0) 推荐(0)