navigationbar

iOS8 Swift UISearchController hides navigationbar

陌路散爱 提交于 2019-12-07 02:48:40
问题 I implemented a search function for an UITableViewController like this: self.resultSearchController = ({ let controller = UISearchController(searchResultsController: nil) controller.searchResultsUpdater = self controller.dimsBackgroundDuringPresentation = false controller.searchBar.sizeToFit() self.tableView.tableHeaderView = controller.searchBar return controller })() The problem I've been experiencing is that if I click on it, my navigation bar and my navigationcontrollers header disappear.

How can the background or the color in the navigation bar be changed?

你离开我真会死。 提交于 2019-12-06 13:57:43
问题 Currently I couldn't find any method to change the color/background of the navigation bar in SwiftUI. Any tips? 回答1: In order to change color of navigation bar for all view controllers, you have to set it in AppDelegate.swift file Add following code to didFinishLaunchingWithOptions function in AppDelegate.swift var navigationBarAppearace = UINavigationBar.appearance() navigationBarAppearace.tintColor = uicolorFromHex(0xffffff) navigationBarAppearace.barTintColor = uicolorFromHex(0x034517) In

Change navigation bar orientation (RTL) programmatically

萝らか妹 提交于 2019-12-06 10:17:17
问题 My application supports 4 different languages, being two of them written from right to left. If I change the language from the android system and then start my application, everything works fine. I get a mirrored layout (RTL) and even the navigation bar is mirrored. My problem is that I have a button in my application to change the language. To change the Locale programmatically I'm doing this: Locale locale = new Locale("ar") Locale.setDefault(locale); Configuration config = new

Objective-c: start app with second view with a navigation bar

爱⌒轻易说出口 提交于 2019-12-06 09:52:07
I'm creating an App for Ipad, I created 3 views with a navigation bar but I would to start my application not in first but in second view, what can i do? You can setup UINavigationController with an initial navigation stack via setViewControllers:animated: . // in application:didFinishLaunchingWithOptions: self.navigationController = [[UINavigationController new] autorelease]; UIViewController *first = [[MyFirstViewController new] autorelease]; UIViewController *second = [[MySecondViewController new] autorelease]; NSArray *controllers = [NSArray arrayWithObjects:first, second, nil];

Why navigation bar is appearing in fullscreen apps when clicked on popup menu

梦想与她 提交于 2019-12-06 02:49:16
问题 I have a fullscreen app: MainActivity.java: public class MainActivity extends AppCompatActivity { @TargetApi(Build.VERSION_CODES.KITKAT) private void removeControlBar(){ View decorView = getWindow().getDecorView(); decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); } @Override public

How to hide the navigation bar in Android 6.0?

99封情书 提交于 2019-12-06 01:55:57
I have the following code: getWindow().getDecorView().setSystemUiVisibility( View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_HIDE_NAVIGATION | View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY); This code worked fine for Android Lollipop, hiding the navigation bar in sticky immersive mode. But now, when I test it on my phone with Android 6.0, the navigation bar goes away while a black rectangle where the navigation bar used to be remains, blocking a portion of the screen. Looking

Set navigationBar color on Android Lollipop with Full screen activity

老子叫甜甜 提交于 2019-12-05 21:43:12
Is there a way to set the navigationbar color in a fullscreen activity? if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { getWindow().setNavigationBarColor(getResources().getColor(R.color.Theme_color)); And this line in my theme-style: <item name="android:navigationBarColor" tools:targetApi="21">#E64A19</item> Both resulting in the same transparant navbar above my activities layout... Code: Acitivity : @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); //Remove title bar this.requestWindowFeature(Window.FEATURE_NO_TITLE); /

Full width horizontal nav bar with evenly spaced items

馋奶兔 提交于 2019-12-05 20:16:27
问题 Starting point: End point: I'm trying to have a horizontal navigation bar that fills 100% of it's container. In the first example, you'll see all of the items aligned to the left. I'm trying to get it to fill the full width of the container as shown in the second example. I want the spacing between all of the items to be uniform (unlike the way it's shown, I just put that together quickly to give you an idea of what I'm trying to do). I need the text to not be an image and the container it

Zurb foundation 5 - topbar search

≡放荡痞女 提交于 2019-12-05 17:55:23
have you occured that problem with zurb foundation's topbar? The input box doesnt fit the navigation. I didnt modify anything, just pasting the code from foundation's page to their example website included into foundation files. Changing the font to Open Sans doesnt help too. For starters, Foundation's styling for the .top-bar input is being overridden by the styling for the more specific input[type="text"] . However, even if you added the type attribute, the styling in the 5.0.2 release is slightly different from that of the example. To mimic the example's styling, add the following to your

Application.Current.MainPage vs Navigation.PushAsync() vs Navigation.PushModalAsync()

三世轮回 提交于 2019-12-05 17:22:27
I'm developing an Xamarin Forms App (PCL) that does NOT need a back button. That app has three pages : a SplashScreenPage to load data, a LoginPage if the user needs to login and a RootPage which is a MasterDetailPage . I was wondering what was the best option to navigate between pages (to avoid memory leaks for example): First solution: Application.Current.MainPage = new ContentPage(); Second solution: Navigation.PushAsync(new NavigationPage(new ContentPage())); then NavigationPage.SetHasNavigationBar(this, false); ClearNavigationStack(); Third solution await Navigation.PushModalAsync(new