iOS - 如何在UINavigationBar下显示视图或控制器?

时间:2015-07-13 14:19:30

标签: ios uinavigationbar

我希望在它下面有一个半透明的导航栏和显示视图或控制器。通过导航栏,用户可以在控制器上看到内容显示。但它始终显示在iOS8中的y = 64。你知道怎么做吗?

1 个答案:

答案 0 :(得分:0)

将此代码放在applicationDidFinishLaunchingWithOption

//可见的viewcontroller

[[UINavigationBar appearance] setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault];

//状态栏

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];

//一行像素

$(function() {
  $("#first_stat").on("change", function() {
    if ($("#second_stat").val() === $(this).val()) {
      $(this).val("");
      alert("Value is the same as Second Stat!")
    }
    // Go on
  });
  // Attach the event to the rest of them.
});