首页 \ 问答 \ 状态栏下方的UIView(UIView underneath Status Bar)

状态栏下方的UIView(UIView underneath Status Bar)

嗨我将UIViewController.view添加到我的应用程序窗口后有一个奇怪的问题。

我创建了一个基于窗口的应用程序,并在我的appDelegates didFinishLaunchingWithOptions方法中添加了我的视图。

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    overviewViewController *overView = [[overviewViewController alloc] initWithNibName:@"overviewViewController" bundle:nil];
    //overView.view.bounds = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
    [window addSubview:overView.view];

    //[overView release];
    [window makeKeyAndVisible];

    return YES;
}

单击“添加”按钮将显示模型视图控制器。 在解除此modelViewController之后,主视图非常适合。

正如您所看到的,我还尝试在添加子视图之前设置界限,但没有任何成功。

有没有人请给我一些提示,如何解决这个问题?


Hi i have a strange issue after adding my UIViewController.view to my Application Window.

I created a window based app and added my view in my appDelegates didFinishLaunchingWithOptions method.

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    

    overviewViewController *overView = [[overviewViewController alloc] initWithNibName:@"overviewViewController" bundle:nil];
    //overView.view.bounds = CGRectMake(0.0f, 20.0f, 320.0f, 460.0f);
    [window addSubview:overView.view];

    //[overView release];
    [window makeKeyAndVisible];

    return YES;
}

clicking the "add" button presents a model view controller. after dismissing this modelViewController the main view fits perfectly.

as you can see, i also tried to set the bounds before adding my subview, without any success.

does anybody have some hints for me please, how to solve this problem?


原文:https://stackoverflow.com/questions/3216250
更新时间:2023-03-02 21:03

最满意答案

我在Openstack Icehouse遇到了同样的问题。 管理如下解决它。

使用“Require all granted”行修改/etc/apache2/sites-available/horizo​​n.conf ,如下所示:

  <Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all granted
  </Directory>

重启apache服务器。 在终端上运行以下命令。

sudo service apache2 restart

你现在应该可以访问地平线了。 希望它会奏效。


I got the same problem on Openstack Icehouse. Managed to solve it as below.

Modify /etc/apache2/sites-available/horizon.conf with the line "Require all granted" as per below:

  <Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all granted
  </Directory>

Restart apache server. Run the following command on your terminal.

sudo service apache2 restart

You should be able to access horizon now. Hope it will work.

相关问答

更多
  • 自然是需要的,docker解决的是封装的时候带上了app所需的环境,属于PaaS层面的项目。 OpenStack用来解决IaaS层面的需求,处于Docker的下层,也可以与Docker很好的结合,目前相关的项目包括Magnum(容器管理),Kolla(容器化)等。
  • 还有必要使用OpenStack吗?观点如下: 这个问题和OpenStack没有直接的联系,也可以套在其他云平台上。大家为什么会拿Docker和OpenStack做比较的原因是:OpenStack是私有云环境中最流行的云平台,在私有云环境中,大家认为可以把Docker作为另一种选择。 有关于Hypervisor的误区:很多KVM和Docker的性能测试的对比跟OpenStack一点关系都没有,因为OpenStack只是一种框架。事实上这种性能测试(不管是KVM还是Docker)是跑在OpenStack下,这表 ...
  • 如果要验证状态,OpenStack有许多元素。 每个组件项目和每个python-client api绑定都有自己的版本。 然后有可配置的选项用于在REST查询中寻址API版本。 为了验证这些数据以及所有python依赖项的目的,我花了很多时间来构建一个API,目的是针对漏洞数据库进行交叉验证,但我根本没有时间将其完成。 我认为这将是一个非常有用的功能。 如果从源代码安装,您可能会查看您的点数要求。 或者,您可以从依赖项中关注debian软件包版本链,这应该可以提供对系统上安装的内容的深入了解,尽管它未经过完 ...
  • 您可以尝试设置此变量: FORCE=yes ./stack.sh You can try and set this variable: FORCE=yes ./stack.sh
  • 我发现它,文件ceilometer/storage/__init__.py包含一个名为STORAGE_OPTS的结构。 向数组添加类似的条目将导致它使用您选择的数据库: cfg.StrOpt('database_connection', default='mysql://root:password@localhost:3306', help='Database connection string', ), I found it, the f ...
  • python cassandra-driver 从2.7.0版本开始默认使用Cython扩展,但是对于那些不容易访问cython发行版或者不需要它的人来说,这可能是一个很好的选择以及。 cython扩展为性能提供了一个好处,但它可能不适用于很多情况(特别是在你没有做高吞吐量的情况下)。 从安装文档 : 默认情况下,该软件包使用Cython来优化核心模块并构建自定义扩展。 这不是一个很难的要求,但默认情况下,它构建的扩展提供了比纯Python实现更好的性能。 使用构建开关或环境变量可以避免此构建阶段: pyt ...
  • 使用Neutron网络,特别是去ovs插件。 因为我在下面给出的说明只适用于它。 您必须在'/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini'中使用以下配置设置ovs插件 [OVS] tenant_network_type = gre network_vlan_ranges = EXTNet enable_tunneling = True tunnel_type = gre tunnel_id_ranges = 1:1000 integratio ...
  • 我在Openstack Icehouse遇到了同样的问题。 管理如下解决它。 使用“Require all granted”行修改/etc/apache2/sites-available/horizon.conf ,如下所示: Options FollowSymLinks AllowOverride None Require all granted 重启apache服务器。 在终端上运行以下命令。 sudo servic ...
  • 我要指出的第一件事是,这段代码花费了大量时间来处理expr子shell扩展,这似乎与此无关。 如果使用bash,对于小素数可以得到更快的结果(不更改算法): prime1() { local -i num="$1" local -i i=1 while (( i++ < num )); do (( num % i )) && continue printf '%d is divisible by %d\n' "$num" "$i" return done pr ...
  • /etc/nova/nova.conf中有这一节: # Whether to start guests that were running before the host # rebooted (boolean value) #resume_guests_state_on_host_boot=false 如果您取消注释该最后一行,并将其更改为= true,则在任何地方重新启动nova服务,这应该可以执行您想要的操作。 There's this section in /etc/nova/nova.conf: ...

相关文章

更多

最新问答

更多
  • python的访问器方法有哪些
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。
  • 响应navi重叠h1和nav上的h1链接不起作用(Responsive navi overlaps h1 and navi links on h1 isn't working)
  • 在C中读取文件:“r”和“a +”标志的不同行为(Reading a File in C: different behavior for “r” and “a+” flags)
  • NFC提供什么样的带宽?(What Kind of Bandwidth does NFC Provide?)
  • 元素上的盒子阴影行为(box-shadow behaviour on elements)
  • Laravel检查是否存在记录(Laravel Checking If a Record Exists)
  • 设置base64图像的大小javascript - angularjs(set size of a base64 image javascript - angularjs)
  • 想学Linux 运维 深圳有哪个培训机构好一点
  • 为什么有时不需要在lambda中捕获一个常量变量?(Why is a const variable sometimes not required to be captured in a lambda?)
  • 在Framework 3.5中使用服务器标签<%=%>设置Visible属性(Set Visible property with server tag <%= %> in Framework 3.5)
  • AdoNetAppender中的log4net连接类型无效(log4net connection type invalid in AdoNetAppender)
  • 错误:发送后无法设置标题。(Error: Can't set headers after they are sent. authentication system)
  • 等待EC2实例重启(Wait for an EC2 instance to reboot)
  • 如何在红宝石中使用正则表达式?(How to do this in regex in ruby?)
  • 使用鼠标在OpenGL GLUT中绘制多边形(Draw a polygon in OpenGL GLUT with mouse)
  • 江民杀毒软件的KSysnon.sys模块是什么东西?
  • 处理器在传递到add_xpath()或add_value()时调用了什么顺序?(What order are processors called when passed into add_xpath() or add_value()?)
  • sp_updatestats是否导致SQL Server 2005中无法访问表?(Does sp_updatestats cause tables to be inaccessible in SQL Server 2005?)
  • 如何创建一个可以与持续运行的服务交互的CLI,类似于MySQL的shell?(How to create a CLI that can interact with a continuously running service, similar to MySQL's shell?)
  • AESGCM解密失败的MAC(AESGCM decryption failing with MAC)
  • SQL查询,其中字段不包含$ x(SQL Query Where Field DOES NOT Contain $x)
  • PerSession与PerCall(PerSession vs. PerCall)
  • C#:有两个构造函数的对象:如何限制哪些属性设置在一起?(C#: Object having two constructors: how to limit which properties are set together?)
  • 平衡一个精灵(Balancing a sprite)
  • n2cms Asp.net在“文件”菜单上给出错误(文件管理器)(n2cms Asp.net give error on Files menu (File Manager))
  • Zurb Foundation 4 - 嵌套网格对齐问题(Zurb Foundation 4 - Nested grid alignment issues)
  • 湖北京山哪里有修平板计算机的