V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
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 · 2011-12-20 19:07:45 +08:00 · 7182 次点击
    这是一个创建于 4509 天前的主题,其中的信息可能已经有所发展或是发生改变。
    UIImagePickerController *picker = [[UIImagePickerController alloc] init];
    //图片选择器的委托,以及设置成可编辑
    picker.delegate = self;
    picker.allowsEditing = YES;
    //决定从哪里取图片
    picker.sourceType = UIImagePickerControllerSourceTypeCamera ;
    //呈现图片选择器

    [self presentModalViewController:picker animated:YES];

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

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

    不过camera页面最好把statusbar隐藏掉
    kakashilw
        4
    kakashilw  
    OP
       2011-12-21 13:32:58 +08:00
    @coupgar 多谢指教。。。不过还是不起总用,还是会有个白边。。
    kakashilw
        5
    kakashilw  
    OP
       2011-12-21 13:39:22 +08:00
    elden
        6
    elden  
       2011-12-21 14:28:05 +08:00
    iOS4下,在root view上插一个包含status bar的颜色的背景( http://d.pr/IZE7 ),过度看起来会自然一点。
    iOS5已经改为向上移动的效果,就没这必要了。
    kakashilw
        7
    kakashilw  
    OP
       2011-12-21 23:14:55 +08:00
    @elden 研究了一天,发现怎么也会出来一个白边,好像是系统自带了,没办法hack
    elden
        8
    elden  
       2011-12-22 00:27:27 +08:00
    @kakashilw 固件版本是多少? 那个白边就是root view的背景吧。
    kakashilw
        9
    kakashilw  
    OP
       2011-12-25 15:08:28 +08:00
    @elden ios3.1.3 , ios 4.3 ,ios5 都试过,我改下root的背景试试
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5718 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 06:29 · PVG 14:29 · LAX 23:29 · JFK 02:29
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.