vue app 兼容性(兼容性)

本文介绍了如何修改iOS应用的info.plist文件来获取拍照权限,并实现了视图自适应调整手机状态栏显示的功能,确保了用户体验的一致性和美观性。
<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
</dict>
<key>LSApplicationQueriesSchemes</key>
<array>
  <string>iosamap</string>
</array>
<key>NSCameraUsageDescription</key>
<string>cameraDesciption</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>photoLibraryDesciption</string>

info.plist 文件的修改 给拍照权限

  • (void)viewWillAppear:(BOOL)animated
    {
    // View defaults to full size. If you want to customize the view’s size, or its subviews (e.g. webView),
    // you can do so here.
    if([[[UIDevice currentDevice]systemVersion ] floatValue]>=7)
    {
    CGRect viewBounds=[self.webView bounds];
    viewBounds.origin.y=20;
    viewBounds.size.height=viewBounds.size.height-20;
    self.webView.frame=viewBounds;
    }
    [super viewWillAppear:animated];
    }

-(void)viewWillDisappear:(BOOL)animated
{
if([[[UIDevice currentDevice]systemVersion ] floatValue]>=7)
{
CGRect viewBounds=[self.webView bounds];
viewBounds.origin.y=20;
viewBounds.size.height=viewBounds.size.height+20;
self.webView.frame=viewBounds;
}
[super viewWillDisappear:animated];
}

MainViewController.m 取消 手机状态栏 被覆盖


打包生成后的项目下的 config.xml 禁止页面滚动

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值