iOS 开发实用技术导航
NSHipster 中文版
› http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
› http://www.cocos2d-iphone.org/
CocoaPods
› http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
› http://code.google.com/mobile/analytics/
WWDC
› https://developer.apple.com/wwdc/
Design Guides and Resources
› https://developer.apple.com/design/
Transcripts of WWDC sessions
› http://asciiwwdc.com
Cocoa with Love
› http://cocoawithlove.com/
Cocoa Dev Central
› http://cocoadevcentral.com/
NSHipster
› http://nshipster.com/
Style Guides
› Google Objective-C Style Guide
› NYTimes Objective-C Style Guide
Useful Tools and Services
› Charles Web Debugging Proxy
› Smore
kakashilw
V2EX  ›  iDev

UIImagePickerController弹出时如何不产生statusBar隐藏效果??

  •  
  •   kakashilw · Dec 20, 2011 · 8669 views
    This topic created in 5431 days ago, the information mentioned may be changed or developed.
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    //图片选择器的委托,以及设置成可编辑
    picker.delegate = self;
    picker.allowsEditing = YES;
    //决定从哪里取图片
    picker.sourceType = UIImagePickerControllerSourceTypeCamera ;
    //呈现图片选择器

    [self presentModalViewController:picker animated:YES];

    这样调用照相机时,statusBar总是有个消失的效果,感觉很别扭。。。

    不知大家有无注意过此问题。。。
    9 replies  •  1970-01-01 08:00:00 +08:00
    feilaoda
    feilaoda
    Dec 20, 2011
    1
    animated:NO
    可能是这个,你使一下。
    kakashilw
    kakashilw
    OP
    Dec 21, 2011
    2
    @feilaoda 还是会出现白条。。。
    coupgar
    coupgar
    Dec 21, 2011
    3
    try this
    [[UIApplication sharedApplication]setStatusBarStyle:UIStatusBarStyleDefault];

    不过camera页面最好把statusbar隐藏掉
    kakashilw
    kakashilw
    OP
    Dec 21, 2011
    4
    @coupgar 多谢指教。。。不过还是不起总用,还是会有个白边。。
    kakashilw
    kakashilw
    OP
    Dec 21, 2011
    5
    elden
    elden
    Dec 21, 2011
    6
    iOS4下,在root view上插一个包含status bar的颜色的背景( http://d.pr/IZE7 ),过度看起来会自然一点。
    iOS5已经改为向上移动的效果,就没这必要了。
    kakashilw
    kakashilw
    OP
    Dec 21, 2011
    7
    @elden 研究了一天,发现怎么也会出来一个白边,好像是系统自带了,没办法hack
    elden
    elden
    Dec 22, 2011
    8
    @kakashilw 固件版本是多少? 那个白边就是root view的背景吧。
    kakashilw
    kakashilw
    OP
    Dec 25, 2011
    9
    @elden ios3.1.3 , ios 4.3 ,ios5 都试过,我改下root的背景试试
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3999 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 47ms · UTC 00:53 · PVG 08:53 · LAX 16:53 · JFK 19:53
    ♥ Do have faith in what you're doing.