ios - Subview Not responding to the taps/touch; -


I have created a tabbar and used the second view controller given below to get a subview like this. . I was successfully loaded the view, but I was unable to interact with Viewcontroller.view loaded inside the view.

Complete. M and .h file code can be seen

  - (zero) tabbar: (UITabBar *) Tabber selected: (UITabBarItem *) Item {[_InnerContentView removeFromSuperview]; _InnerContentView = Zero; _InnerContentView = [[UIView alloc] init]; // UIView Inside as the Main View; Used to add other views as sub-view vc = nil; // UIViewController; Switch (itemt) {Case 10: VC = [[Indropoget visual controller alloc] initWithNibName: @ "IndoProject Visual Controller" bundle: zero]; Self.navigationItem.title = @ "" project "; Vc.view.frame = CGRectMake (0, 0, _InnerContentView.frame.size.width, _InnerContentView.frame.size.height-self.tabBar.frame.size.height) ; [_InnerContentView addSubview: vc.view]; [Self.view addSubview: _InnerContentView]; break; case 11: VC = [[[Indtscoswukantrolr light] initWithNibName: @ "Indtsk Drishykantrolr" bundle: nil]; Self.navigationItem.title = @ "function"; Vc.view.frame = CGRectMake (0, 0, _InnerContentView.frame.size.width, _InnerContentView.frame.size.height-self.tabBar.frame.size.height); [_InnerContentView addSubview: vc. View]; [Self.view addSubview: _InnerContentView]; breakdown; Case 12: VC = [[InduJus Visualizer Alok] initWithNibName: @ "Individual Dup Lejiwukantrolr "bundle: nil]; Self.navigationItem.title = @" document "; Vc.view.frame = CGRectMake (0, 0, _InnerContentView.frame.size.width, _InnerContentView.frame.size.height-self.tabBar. Frame.size.height); [_InnerContentView addSubview: vc.view]; [Self.view addSubview: _InnerContentView]; break; }}   

What's wrong with it.

Complete. M and .h file code can be seen

adding the following in the UItabbar delgate method fixes the problem Check it down, because it is a mistake of mistake that often comes to me.

  _InnerContentView.frame = CGRectMake (x, y, self.view.frame.size.width, self.view.frame.size.height-self.tabBar.frame.size.height- Y);   

After adding it it will look:

  - (zero) tabbar: (UITabBar *) Tabber selected: (UITabBarItem *) item { [_InnerContentView removeFromSuperview]; _InnerContentView = Zero; _InnerContentView = [[UIView alloc] init]; _InnerContentView.frame = CGRectMake (X, Y, self.view.frame.size.width, self.view.frame.size.height-self.tabBar.frame.size.height-y); Vice Chancellor = nil; Switch (item.tag) {case 10: self.navigationItem.title = @ "" project "; Vc = [[IndProjectViewController alloc] initWithNibName: @" Indoprojekt view controller "bundle: nil]; Vc.view.frame = CGRectMake ( 0, 0, _inrkantentviavkfremksaijkvidth, _inrkantentviavkfremksaijkhait-Selfktbbrkfremksaijkhait) [_inrkantentviav Addsubviev: Vkkwu] [Selfkwu Addsubviev: _inrkantentviav]; < / Code>   

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -