摘要: //按钮事件-(IBAction)btnRead{ UIAlertView* a=[[UIAlertViewalloc]init]; a=[[UIAlertViewalloc] initWithTitle:@"b"message:@"s"delegate:selfcancelButtonTitle:@"确定"otherButtonTitles: @"取消",nil]; [a show];}//定义的委托,buttonindex就是按下的按钮的index值- (void)alertView:(UIAlertView 阅读全文
posted @ 2012-03-29 12:00 凡娃软件 阅读(705) 评论(0) 推荐(0) 编辑
摘要: //Web Service Call NSString *soapMessage = [NSString stringWithFormat: @"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" "<SOAP-ENV:Envelope \n" "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" \n" ... 阅读全文
posted @ 2012-03-16 17:42 凡娃软件 阅读(321) 评论(0) 推荐(0) 编辑
摘要: 一般都是开启arc功能,毕竟不需要自己手动去释放,是一件比较轻松的事情。但是我们在引用第三方的时候,基本上都是带release与retain的方法,这个时候代码编译就通不过我们可以设置部分文件不使用arc,这样就可以兼容了。步骤:1.在builde phases 中,compile sources 2.选中文件,双击文件,在弹出框中输入-fno-objc-arc,3.编译就可以通过了 阅读全文
posted @ 2012-03-12 16:00 凡娃软件 阅读(309) 评论(0) 推荐(0) 编辑
摘要: 谢谢lamo的提醒,这个5.0确实无效。//添加5.0下需加入的代码 if ([self.navigationController.navigationBar respondsToSelector:@selector( setBackgroundImage:forBarMetrics:)]){ [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"check_yes.png"] forBarMetrics:UIBarMetricsDefault]; [... 阅读全文
posted @ 2012-03-07 10:09 凡娃软件 阅读(378) 评论(1) 推荐(0) 编辑
摘要: 1.换颜色 CGRect frame = CGRectMake(0, 0, 320, 47);UIView *v = [[UIView alloc] initWithFrame:frame];UIColor *c = [[UIColoralloc] initWithRed:0.4green:0.7blue:0.3alpha:1.0]; v.backgroundColor = c;[tabBarController.tabBarinsertSubview:v atIndex:0];2.换图片UIImageView* image = [[UIImageViewalloc] initWithIm.. 阅读全文
posted @ 2012-03-06 15:44 凡娃软件 阅读(386) 评论(0) 推荐(0) 编辑
摘要: //匹配titlestring reg="<td class=\"odd\">(?<Title>[\\s\\S]).*?)<td>";//匹配tiitle与value//string reg ="<td class=\"odd\">(?<Title>[\\s\\S]).*?)<td>([^<])<td class=\"value\">(?<Value>[\\s\\S].*?)</td>&quo 阅读全文
posted @ 2012-03-06 12:00 凡娃软件 阅读(628) 评论(0) 推荐(0) 编辑
摘要: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindowalloc] initWithFrame:[[UIScreenmainScreen] bounds]]; self.window.backgroundColor = [UIColorwhiteColor]; //生成各个视图控制器 MedicalData* aa = [[MedicalDataalloc]init]; ... 阅读全文
posted @ 2012-03-06 09:56 凡娃软件 阅读(2553) 评论(0) 推荐(0) 编辑
摘要: - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.backgroundColor = [UIColor whiteColor]; //生成各个视图控制器 MedicalData* aa = [[MedicalData... 阅读全文
posted @ 2012-03-05 15:45 凡娃软件 阅读(437) 评论(0) 推荐(0) 编辑
摘要: //创建文件-(void)CreateFile:(NSString*)path fileName:(NSString*)filename{ //创建文件管理器 NSFileManager *fileManager = [NSFileManager defaultManager]; //更改到待操作的目录下 [fileManager changeCurrentDirectoryPath:[path stringByExpandingTildeInPath]]; //创建文件fileName文件名称,contents文件的内容,如果开始没有内容可以设置为nil,attributes文... 阅读全文
posted @ 2012-03-05 10:56 凡娃软件 阅读(354) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 获得字符串中开始和结束字符串中间得值 /// </summary> /// <param name="str">字符串</param> /// <param name="s">开始</param> /// <param name="e">结束</param> /// <returns></returns> public static string GetValue(string s 阅读全文
posted @ 2012-03-01 16:35 凡娃软件 阅读(8290) 评论(0) 推荐(0) 编辑