0

I am working on uitabbarcontroller. When i click on one tabbaritem at that time i am place two button at the top of view and want to open different view on button click, i don't want to move to another view, the uitabbaritem at the bottom should be remaining the same.

Please look at this picture

here i want to open different view on Company profile and My profile.

Please check my structure of storyboard

how can i add scrollview with containor view. i am using this structure in below image

This is the structure i used, more contents i need to add in the embedded view on container view

sandeep tomar
  • 303
  • 1
  • 5
  • 17
  • hello sir, i think this tutorial will not help me, i don't want any back button, i just want to open a view when click on (company profile) and again change view when click on (My profile). The buttons at the top will be visible when open any view. – sandeep tomar Nov 17 '15 at 06:42
  • hello sir Please give me some suggestions. – sandeep tomar Nov 17 '15 at 08:38
  • sure my bro which type output u need, once see this link http://stackoverflow.com/questions/33706790/how-to-push-one-uiview-to-another-uiview-in-ios-using-animation-concept/33706905#33706905 – Anbu.Karthik Nov 17 '15 at 08:45
  • Thanks for your response sir, i just want that when i click on profile item(see my attached image) on uitabbaritem a default view will open for company profile and then if i click on MY profile a view will open with the same size. – sandeep tomar Nov 17 '15 at 08:55
  • ok fine now what the issue u faced... and where you struck – Anbu.Karthik Nov 17 '15 at 08:57
  • This is the structure i am using in Storyboard, My problem is i am unable to present a view on click of (My profile ) button. i want to override these views on the click of company profile and my profile. – sandeep tomar Nov 17 '15 at 09:09
  • no bro , is not comes inside else if you need this use "Containerviewcontroller", or else push viewcontroller, in this scenario above answer does not work. – Anbu.Karthik Nov 17 '15 at 09:12
  • Thanks sir i think it will work for me, but there is one query from my side, i have to add lots of textfield button and label on view so can i use it scrollview in it easily??? – sandeep tomar Nov 17 '15 at 10:33
  • ya but you need to retrive the value from that view controller then you go for delegate /protocol – Anbu.Karthik Nov 17 '15 at 10:52
  • hello sir, how can i add uiscrollview inside the child view of uicontainor. Please help me in this scenario. – sandeep tomar Nov 18 '15 at 11:17
  • hello sir please help me, i added a new screenshot of my problem – sandeep tomar Nov 21 '15 at 09:29

1 Answers1

1

Since you are creating the two buttons programatically, you can also create the view programatically when the button is clicked.

Use the button's addTarget Method to create the views and add them to the viewcontroller.

I think in your case, it would be better to create a new viewcontroller and present it modally, instead of creating a view and adding it.

TheAppMentor
  • 1,091
  • 7
  • 14