Translate

顯示具有 iOS7 標籤的文章。 顯示所有文章
顯示具有 iOS7 標籤的文章。 顯示所有文章

2014年7月20日 星期日

轉帖:iOS7下UINavigationController Push / Pop ViewController 动画过程中出现视图叠加重影问题的解决

轉帖link
前两天,遇到一个莫名其妙的问题。
使用UINavigationController push一个新的controller的时候, 动画过程中rootController的view上的元素总是会有一部分叠加在新的controller的view上, 造成视觉混乱。

后来发现,由于创建controller 时,view默认的background color为透明色。(主要是当所有的view背景均显示为白色的时候,很难去发现这个背景色是透明的) 只要讲这个背景色改成非透明色即可!

在这里留个记号!

2014年4月11日 星期五

iOS7 取得麥克風權限

Add framework
#import AVFoundation/AVFoundation.h //取得錄音權限 - (BOOL)canRecord { __block BOOL bCanRecord = YES; if ([[[UIDevice currentDevice] systemVersion] compare:@"7.0"] != NSOrderedAscending) { AVAudioSession *audioSession = [AVAudioSession sharedInstance]; if ([audioSession respondsToSelector:@selector(requestRecordPermission:)]) { [audioSession performSelector:@selector(requestRecordPermission:) withObject:^(BOOL granted) { if (granted) { bCanRecord = YES; } else { bCanRecord = NO; } }]; } } return bCanRecord; } #pragma mark - Audio Recorder √ /*開始錄音*/ - (void)startToRecord:(id)sender { if (![self canRecord]) { [[[UIAlertView alloc] initWithTitle:nil message:[NSString stringWithFormat:@"%@需要訪問你的麥克風。\n請起用麥克風-設定/隱私/麥克風", [TIXAAppMonitor sharedMonitor].appName] delegate:nil cancelButtonTitle:@"好" otherButtonTitles:nil] show]; return; } }

2014年3月24日 星期一

把状态栏的文字颜色改成白色

1.在info.plist里面添加字段 key----View controller-based status bar appearance value---NO 在appDelegate里面添加代码: [[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationFade]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];

iOS7 UITableView底線右移問題

在ios7上UITableView底线右移了,我们可以通过添加代码来让它铺满整个屏幕的宽,在使用前要加上判断是否有这个方法,因为只有ios7以上才有。
if ([_tableView respondsToSelector:@selector(setSeparatorInset:)]) { [_tableView setSeparatorInset:UIEdgeInsetsZero]; }

2013年10月7日 星期一

iOS6轉iOS7的layout問題

最近被iOS6轉iOS7的layout搞死了
為什麼xcode5沒把這部分給改好
搞得開發者都頭暈了
最後我是看了這個文章的介紹去針對ios7的layout做改變
做起來的確有效^_^
推薦一下給大家囉
使用 Interface Builder 設計 iOS7 Layout 並與 iOS6/iOS5 相容