Tag: uitabbarcontroller

标签栏项目不显示

if(!isUserLoggedIn){ var loginViewController = mainStoryBoard.instantiateViewControllerWithIdentifier("loginView") as! LoginViewController window!.rootViewController = loginViewController window!.makeKeyAndVisible() }else{ var mainViewController = mainStoryBoard.instantiateViewControllerWithIdentifier("mainView") as! FirstViewController var myDealsViewController = mainStoryBoard.instantiateViewControllerWithIdentifier("myDealsViewController") as!MyDealsViewController var settingsViewController = mainStoryBoard.instantiateViewControllerWithIdentifier("settingsView") as! SettingsViewController var centerNav = UINavigationController(rootViewController: mainViewController) as UINavigationController var myDealNavController = UINavigationController(rootViewController: myDealsViewController) as UINavigationController let controllers = [centerNav,myDealNavController,settingsViewController] tabBarController.viewControllers = controllers window!.rootViewController = tabBarController window!.makeKeyAndVisible() } […]

从Modal退回到第一个标签栏

我有两个TabBarController视图embedded在一个NavigationController和一个视图模态提供自己的NavigationController: FeedView(1)(TableViewController – >包含在TabBarController中) VenueView(2)(CollectionViewController – >包含在TabBarController中) SelectView(3)(ViewController – >从VenueView呈现的模式) 在VenueView(2)中,我有以下代码来调出SelectView(3): override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) { let selectNavigationController = self.storyboard?.instantiateViewControllerWithIdentifier("selectNavController") as! UINavigationController let selectVC = selectNavigationController.topViewController as! SelectViewController selectVC.currentVenue = venueItems[indexPath.row] presentViewController(selectNavigationController, animated: true, completion: nil) } 这允许我调出SelectView(3)没有tabbarcontroller,但仍然有一个导航栏。 我有一个SelectView(3)中的button,我想用它来坚持一个对象的数据,继续进入FeedView(1)。 我已经尝试了很多方法,但最接近成功的是继续FeedView(1),但添加更多viewControllers(由navbar中的buttoncertificate),并没有包含在TabBarController内。 什么是创build这个segue的正确方法? 我知道如何坚持数据,但是我的问题更多地涉及从模式视图继续到BarTab的第一个选项卡的正确技术。 以下图片供参考:

IOS iPad应用底部奇怪的白色区域

我开发了iPad tabbar应用程序。 我也使用左侧的自定义选项卡。 Bu标签栏在横向模式下还有沿着边缘的白色背景,还有纵向模式。 这个区域不能删除任何方法。

我不能将标题设置为我的编程标签栏控制器

我尝试以编程方式创build标签栏控制器。 这是好的,但我不能设置标题栏标签项目..我怎么能做到这一点? – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. myTabBarController = [[UITabBarController alloc] init]; tab1 = [[ZiyaretFormTab1 alloc] initWithNibName:@"ZiyaretFormTab1" bundle:nil]; tab2 = [[ZiyaretFormTab2 alloc] initWithNibName:@"ZiyaretFormTab2" bundle:nil]; tab3 = [[ZiyaretFormTab3 alloc] initWithNibName:@"ZiyaretFormTab3" bundle:nil]; tab4 = [[ZiyaretFormTab4 alloc] initWithNibName:@"ZiyaretFormTab4" bundle:nil]; tab5 = [[ZiyaretFormTab5 alloc] initWithNibName:@"ZiyaretFormTab5" bundle:nil]; UITabBarItem […]

自定义rightBarButtonItem消失

我在NavBar中有一个自定义的RightBarButtomItem的奇怪的错误。 我有一个TabBar应用程序。 如果该应用程序已加载button显示正确。 如果我点击标签button不断显示。 如果我回到已经显示的标签之一,button消失。 最后,button只在其中一个标签中随机显示。 我的代码完美工作,如果我设置一个标准的rightBarButtomItem编程。 但不是自定义graphics。 如果一个ChildViewController被按下并popup,该button再次出现。 它似乎仍然存在但不可见! 我认为我在CustomTabBarViewController中的sharedRightButton的引用是错误的! 任何人都可以帮忙吗? CustomTabBarController.h #import <UIKit/UIKit.h> #import "EZBadgeView.h" @interface CustomTabBarController : UITabBarController { EZBadgeView *badgeView; UIButton *btn; UIImage *rightBarButtonItemImage; UIImage *rightBarButtonItemImageTapped; UIImage *rightBarButtonItemImageSelected; } @property (nonatomic, strong) UIBarButtonItem *sharedRightButton; @property (nonatomic, strong) EZBadgeView *badgeView; @property(nonatomic, strong) UIButton *btn; @property(nonatomic, strong) UIImage *rightBarButtonItemImage; @property(nonatomic, strong) UIImage *rightBarButtonItemImageTapped; […]

UITabBarController中tabBarItems的大小

我在iPad有4个标签。 问题是,有时文本比button更大,但我有更多的空间来使用。 但是, UITabBarController不使用tabBarItems所有宽度。 有没有办法做到这一点?

在TabBarController中的UIImagePickerController

我想实现在UITabBarController里面的imagepickercontroller。 到现在为止还挺好…. 在我的ViewController,我启动imagePickerController,然后放置在我的TabBarViewController tabbar数组中,我实现了“loadview”方法: – (void)loadView{ self.arController = [[IFAugmentRealityController alloc] initWithViewController:self]; [self showCamera]; [self initOverlayController]; self.picker.delegate = self; [self.view addSubview:self.picker.view]; } – (void)initOverlayController { overlay = [[IFAROverlayView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGTH)]; overlay.delegate = self; } – (void)showCamera { self.picker = [[UIImagePickerController alloc] init]; self.picker.navigationBarHidden = YES; self.picker.toolbarHidden = YES; self.picker.sourceType = UIImagePickerControllerSourceTypeCamera; self.picker.showsCameraControls = […]

将实用程序应用程序(2个视图控制器)转换为选项卡栏应用程序

如标题所示,我已经构build了一个基于实用程序的应用程序。 该应用程序包括(目前)2视图控制器+模型类层次结构。 事情是,因为我想添加一些function的应用程序,我想将其转换为基于TabBar的应用程序。 作为第一步,我希望第一个视图是标签栏的第一个视图,而flipSideView是其他标签栏项目之一。 这样的任务有没有“标准程序”/“购物清单”? 我相信你们中的一些人遇到了同样的问题,并且会喜欢一些关于“切片”应用程序的build议,并且在为主窗口创build一个新的nib文件之后“连线”(这是第一步? 提前致谢。

在XIB中提供了一个StoryBoard选项卡的导航条项目根视图控制器Segue

我的应用程序有很多继续,大声笑。 在我的主菜单上,如果你点击“聊天”,它会带你到聊天XIB。 如果你看看导航栏的左上angular,我有一个名为“主菜单”。 我想让我回到主菜单。 我的主菜单是在main.toryboard上。 聊天是一个XIB。 两个视图都有选项卡栏。 我一整天都在试图弄清楚这一点。 这是我尝试过的最后一件事情: -(void)MainMenu { MainMenuTabBarControllerViewController *MMTBC = [[MainMenuTabBarControllerViewController alloc]init]; [self.navigationController popToViewController:MMTBC animated:YES]; } – (void)viewDidLoad //————————————————————————————————————————————————- { [super viewDidLoad]; self.title = @"Group"; //——————————————————————————————————————————————— self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"New" style:UIBarButtonItemStylePlain target:self action:@selector(actionNew)]; self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Main Menu" style:UIBarButtonItemStyleBordered target:self action:@selector(MainMenu)]; //——————————————————————————————————————————————— self.tableView.tableFooterView = [[UIView alloc] init]; //——————————————————————————————————————————————— chatrooms […]

ViewController在UITabBarController中的转换瓶颈

当我点击一个特定的UITabBarItem切换ViewControllers时,转换大约需要4 – 5秒。 没有重大的处理正在做,所以这使我相信,代码是无效的。 按照评论中的build议看了仪器之后,我已经指出以下过程要花费〜> 2500毫秒 Running Time Self (ms) Symbol Name 2485.0ms 44.3% 0.0 TDescriptorSource::CopyDescriptorsForRequestFromArray(__CFArray const*, __CFDictionary const*, CFComparisonResult (*)(void const*, void const*, void*), void*, unsigned long, bool) const 和 Running Time Self (ms) Symbol Name 3070.0ms 54.7% 0.0 -[UIStackView initWithCoder:] 这是什么意思?