uitabbaritem

Objective-C: Tabbaritem tapped->Method Called-> But WebView not refreshed

走远了吗. 提交于 2020-01-06 05:22:26
问题 Trying to achieve When I tap on the tabbaritem say #2, it will called the method and reload the web view. Issue When I tap on the tabbaritem, the method is called but web view did not reload. Did not load the web view Question If I called the method on the VC itself. I can manage to reload the web view. Only if I called it when the tabbaritem is tapped, it doesn't reload the web view. Code MyTabBarController.m - (void)tabBarController:(UITabBarController *)tabBarController

Remove mask from deselected tabs UITabBarItem Swift

。_饼干妹妹 提交于 2020-01-03 05:22:39
问题 I am trying to implement an UITabBarController with 2 UITabBarItems . I added in storyboard the TabBarController. I almost did it, but still I am blocked with 2 important issues: 1) Here is how tab bar should look: Please ignore orange button, that is not a tabItem. So I put 2 tabItems , and I want to keep white images for both tabs even if one of them is selected. I checked a lot of times with tintColor , barTintColor and no success. Also I tried to set tabBarItem in ViewController: override

Changing selected TabBarItem font iOS

陌路散爱 提交于 2020-01-02 02:20:15
问题 I have a TabBar. I am trying to style it so that the titles on the TabBarItems have different fonts for the normal state and the selected state. For normal state I want Helvetica Neue Light and for the selected state I want Helvetica Neue Medium. No matter what I do, I can't seem to get the fonts to be different for these two states. The color changing works fine. Here is what I currently have: // Set the tab bar title appearance for normal state. [[UITabBarItem appearance]

iPhone, UITabBarItem: Dynamically change image of a tab bar when app starts

末鹿安然 提交于 2020-01-01 19:25:12
问题 When my app loads I want to change the image on one of the tabs based on a saved setting set by the user the last time they ran the app. I am able to change the image when the user clicks on the tab which executes that tab's viewcontroller's ViewDidLoad method. see below: UITabBarItem *tabItem; if (condition = YES) { tabItem = [[UITabBarItem alloc] initWithTitle:@"Filter" image:[UIImage imageNamed:@"filter plus.png"] tag:self.view.tag]; } else { tabItem = [[UITabBarItem alloc] initWithTitle:@

UITabBarItem.title vs. UINavigationController.title

↘锁芯ラ 提交于 2020-01-01 10:45:53
问题 I allocated a UITabBarItem with a title (initWithTitle) and connected it to a UINavigationController. I found out that if the navigation controller's root view controller has its own title, then that title permanently replaces the title specified on the tab bar item. For example, if the tab bar items' title is set to ONE and the navigation controller's root view controller's title is set to TWO, the tab bar item always shows TWO, not ONE. The only way to have the tab bar item show ONE is to

Swift 3 - full width of UITabBarItem for selectionIndicatorImage

…衆ロ難τιáo~ 提交于 2019-12-31 07:15:07
问题 i have a UITabBar with three tabs. Now I want to assign or lets say to fill the complete width of one tab to the related selectionIndicatorImage cause currently I got a border if a tab is selected. Like the tab on the left side shows in the following screenshot: I made a subclass of UITabBar with a new property: var activeItemBackground:UIColor = UIColor.white { didSet { let numberOfItems = CGFloat((items!.count)) let tabBarItemSize = CGSize(width: frame.width / numberOfItems, height: frame

How to change UITabBarItem Badge position?

时光总嘲笑我的痴心妄想 提交于 2019-12-31 02:10:09
问题 This is how my Tabbar is looking right now. How do I move that badge so that it overlaps the top right of the bell icon? Any help is appreciated. 回答1: try this: func repositionBadge(tabIndex: Int){ for badgeView in self.tabBarController!.tabBar.subviews[tabIndex].subviews { if NSStringFromClass(badgeView.classForCoder) == "_UIBadgeView" { badgeView.layer.transform = CATransform3DIdentity badgeView.layer.transform = CATransform3DMakeTranslation(-17.0, 1.0, 1.0) } } } pay attention, tabIndex

How to add a badge to the system generated “More” UITabBarItem

不想你离开。 提交于 2019-12-30 19:49:54
问题 My app has 6 menu items, so the OS shows the first 4, then shows a "More" item that links to a screen where the user can select the other two. My problem is that I want to show a badge on the More item so that the user knows that one of the menu items that is hidden needs their attention. (It's clear to our users which hidden item the badge represents since one of the hidden items is Settings and the other is current Uploads) I don't know how to access the "More" item since the "items" array

How to change color for tab bar non selected icon in swift?

偶尔善良 提交于 2019-12-30 08:15:00
问题 How to change color for tab bar non selected icon and text? I found this answer (How to change inactive icon/text color on tab bar?), but can't implement it for swift. 回答1: iOS 10 class TabBarVC: UITabBarController { override func viewDidLoad() { super.viewDidLoad() // make unselected icons white self.tabBar.unselectedItemTintColor = UIColor.white } } 回答2: The below sets the defaults for all UITabBarItem's, you can add it to your AppDelegate . It will change your text color. UITabBarItem

How to present UIImagePickerController from tab bar item

和自甴很熟 提交于 2019-12-25 04:36:40
问题 I have a UITabViewController. I'm trying to modally present a UIImagePickerController when a specific tab bar item is selected. It must appear over the current UIViewController. This is like what happens in the Instagram or Periscope app when you press on the camera icon. However I can't figure out how to display the UIImagePickerController without displaying the UIViewController that's connected to the Tab Bar Item. Is this possible? Thanks, Yusuf 回答1: You can use the