iOS 开发总结(9)
来源:未知 责任编辑:责任编辑 发表时间:2013-12-01 14:19 点击:次
NSMutableDictionary *plist = [NSDictionary dictionaryWithContentsOfFile: path];
//Now read and set key/values
myKey = (int)[[plist valueForKey:@"myKey"] intValue];
myKey2 = (bool)[[plist valueForKey:@"myKey2"] boolValue];
[plist setValue:myKey forKey:@"myKey"];
[plist writeToFile:path atomically:YES];
Alerts
Show a simple alert with OK button.
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:nil message:
@"An Alert!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
Info button
Increase the touchable area on the Info button, so it's easier to press.
CGRect newInfoButtonRect = CGRectMake(infoButton.frame.origin.x-25, infoButton.frame.origin.y-25, infoButton.frame.size.width+50, infoButton.frame.size.height+50);
[infoButton setFrame:newInfoButtonRect];
Detecting Subviews
You can loop through subviews of an existing view. This works especially well if you use the "tag" property on your views.
for (UIImageView *anImage in [self.view subviews])
{
if (anImage.tag == 1)
{ // do something }
}
相关新闻>>
- 发表评论
-
- 最新评论 进入详细评论页>>
今日头条
更多>>您可能感兴趣的文章
- (iOS-iap防护)验证用户付费收据,拒绝iap
- iPhone开发 调用阿asp.net程序的webservice
- iphone开发基础三和c语言混编
- 深入理解iPhone静态库(手把手教你iphone开发
- iPhone开发 文件的增加删除查询
- ios 关于UITableView UITableViewCellAccessoryCheckmark 混乱的
- ios 时间定时器 NSTimer应用demo
- iOS文件存磁盘的设想
- iphone-使用TextField及关闭键盘(useing TextField for in
- Cocoa Core Competencies 的Object creation 和IOS面试题示例
新闻点评
新闻关注排行榜
热门推荐
最新推荐