类和文件AppDelegate.m#import"AppDelegate.h"
#import"MainViewController.h"
@implementationAppDelegate
-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
self.window=[[UIWindowalloc]initWithFrame:[[UIScr..
分类:
其他好文 时间:
2014-09-05 10:12:02
阅读次数:
251
#import"AddressBookNavigationController.h"@interfaceAddressBookNavigationController()@end@implementationAddressBookNavigationController-(id)initWithNibName:(NSString*)nibNameOrNilbundle:(NSBundle*)nibBundleOrNil{self=[superinitWithNibName:nibNameOrNilbundle..
分类:
其他好文 时间:
2014-09-05 03:25:41
阅读次数:
198
//重写callwebviewgetter方法-(UIWebView*)callWebview{if(!_callWebview){self.callWebview=[[[UIWebViewalloc]init]autorelease];//记得添加到view上[self.viewaddSubview:self.callWebview];}return[[_callWebviewretain]autorelease];}
分类:
其他好文 时间:
2014-09-05 03:25:31
阅读次数:
251
//从plist文件中读取数据-(void)readDataFromPlist{//1.先获取文件路径NSString*filePath=[[NSBundlemainBundle]pathForResource:@"Book"ofType:@"plist"];//2.根据路径初始化字典对象self.dic=[NSMutableDictionarydictionaryWithContentsOfFile:filePath];//将不可边字典变成..
分类:
其他好文 时间:
2014-09-05 03:25:11
阅读次数:
155
//指定tableView的数据源tableView.dataSource=self;//指定tableview代理tableView.delegate=self;//配置索引值的颜色tableView.sectionIndexColor=[UIColorlightGreenColor];//设置tableview的headerView(最上面显示的视图)UILabel*phoneLabel=[[UILabelalloc]initWithFrame:C..
分类:
其他好文 时间:
2014-09-05 03:24:51
阅读次数:
192
-(void)configureNavigationBar{//设置navigationBar的颜色UILabel*titleLabel=[[UILabelalloc]initWithFrame:CGRectMake(0,0,100,40)];titleLabel.textColor=[UIColorwhiteColor];titleLabel.textAlignment=NSTextAlignmentCenter;titleLabel.text=@"通讯录";self.navigationI..
分类:
其他好文 时间:
2014-09-05 03:24:41
阅读次数:
147
-(void)back:(UIButton*)btn{//返回上一界面[self.navigationControllerpopViewControllerAnimated:YES];//返回到第一个界面//[self.navigationControllerpopToRootViewControllerAnimated:YES];//返回到指定的界面(必须是上面的界面)//[self.navigationControllerpopToViewCon..
分类:
其他好文 时间:
2014-09-05 03:23:41
阅读次数:
164
///////当应用程序接在完成时触发-(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{NSLog(@"%s",__FUNCTION__);self.window=[[UIWindowalloc]initWithFrame:[[UIScreenmainScreen]bounds]];//Overridepointforcusto..
分类:
其他好文 时间:
2014-09-05 03:20:41
阅读次数:
269
实现自定义View的关键是重载UIView的drawRect: 方法,因为主要是通过重载这个方法,来改变view的外观。例如:- (void)drawRect:(CGRect)rect { // 绘图 CGRect bounds = [self bounds]; // Where ...
分类:
其他好文 时间:
2014-09-05 00:53:10
阅读次数:
274
服务器端PHP文件connect.php:IOS段解析:- (IBAction)clickbutton:(id)sender { [NSThread detachNewThreadSelector:@selector(getjasonstring) toTarget:self withObje...
分类:
移动开发 时间:
2014-09-04 23:29:30
阅读次数:
189