Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Aug 14, 2012, 03:00 AM   #1
akaash1087
macrumors newbie
 
Join Date: Jul 2010
Rows in master view dont respond to clicks..

I am working on a splitview based app.In one of my detail VCs I am presenting a VC modally.My master VC consists of several rows.On each row click a different view appears in the detail view.When I present a VC modally
from within one of my DetailViewcontrollers ,the rows in my master view dont respond to clicks.
Is there any reason behind it..

I have tried to use loadView method but it rotates the screen.How do I prevent that from happening??.
Any help would be highly appreciated..
akaash1087 is offline   0 Reply With Quote
Old Aug 14, 2012, 08:48 AM   #2
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by akaash1087 View Post
When I present a VC modally
from within one of my DetailViewcontrollers ,the rows in my master view dont respond to clicks.
Is there any reason behind it..
What is your understanding of what modal views are and how they work?
__________________
dejo is offline   0 Reply With Quote
Old Aug 16, 2012, 01:12 AM   #3
akaash1087
Thread Starter
macrumors newbie
 
Join Date: Jul 2010
Modall VCs are used to present a Vc from within another VC..

Modal views are basically used when you want to present a VC's content from within another VC.It could be needed when you want to present a screen on a btn click,in that case you would write the action for that btn,within which you use PresentModalViewController() method.
This is what I am doing..
In my splitview app there are master panes and detailVCs,with different Views coming up on different row clicks.In one of the views I present a VC modally on a btn click,it gets presented ..but after that when I click on different rows of
my master view ,different Views dont appear..as they did earlier..
akaash1087 is offline   0 Reply With Quote
Old Aug 16, 2012, 03:57 AM   #4
akaash1087
Thread Starter
macrumors newbie
 
Join Date: Jul 2010
loadView rotates the screen??..

I also called loadView method on splitviewcontroller.I called it in the didSelectRowAtIndexPath: method of the source file which corresponds to the master view(consisting of a number of rows) where I am checking which row the user has clicked and then doing the appropriate thing.In that I call loadView method on the splitviewcontroller .The screen corresponding to that row comes up (it was not coming up earlier) but it is rotated.I dont know what causes the screen to rotate.
What can I do to prevent the screen to rotate?
akaash1087 is offline   0 Reply With Quote
Old Aug 16, 2012, 06:56 AM   #5
Duncan C
macrumors 6502a
 
Duncan C's Avatar
 
Join Date: Jan 2008
Location: Northern Virginia
 
Quote:
Originally Posted by akaash1087 View Post
Modal views are basically used when you want to present a VC's content from within another VC.It could be needed when you want to present a screen on a btn click,in that case you would write the action for that btn,within which you use PresentModalViewController() method.
This is what I am doing..
In my splitview app there are master panes and detailVCs,with different Views coming up on different row clicks.In one of the views I present a VC modally on a btn click,it gets presented ..but after that when I click on different rows of
my master view ,different Views dont appear..as they did earlier..
A modal VC locks the screen so you can't do anything else until you finish with it. It puts the device into a "mode". That's the way it is supposed to work. If you don't want that to happen, add a subview to your VC rather than presenting a modal VC

----------

Quote:
Originally Posted by akaash1087 View Post
I also called loadView method on splitviewcontroller.I called it in the didSelectRowAtIndexPath: method of the source file which corresponds to the master view(consisting of a number of rows) where I am checking which row the user has clicked and then doing the appropriate thing.In that I call loadView method on the splitviewcontroller .The screen corresponding to that row comes up (it was not coming up earlier) but it is rotated.I dont know what causes the screen to rotate.
What can I do to prevent the screen to rotate?

If you read the docs on loadView:


Quote:
loadView
Creates the view that the controller manages.

- (void)loadView
Discussion
You should never call this method directly. The view controller calls this method when its view property is requested but is currently nil. This method loads or creates a view and assigns it to the view property.
When you ignore warnings like that, the results are undefined.
__________________
Regards,
Duncan Champney, WareTo.
Check out our latest iOS app, Face Dancer, available for free on the App Store.
Duncan C is offline   0 Reply With Quote
Old Aug 16, 2012, 09:10 AM   #6
akaash1087
Thread Starter
macrumors newbie
 
Join Date: Jul 2010
Got it..I had read that..but I ignored it..because I was not getting any output..
I will take care in future..

Thanks a lot..
akaash1087 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Macbook Pro right clicks when left clicks (software bug?) Anitramane OS X Mavericks (10.9) 1 May 21, 2014 11:40 AM
Limit Table View Rows to show 1 row only newtoiphonesdk iPhone/iPad Programming 0 Dec 16, 2012 09:37 PM
Now there are 5 rows instead of 4 on the iPhone 5 The Game 161 iPhone 3 Sep 17, 2012 07:08 AM
5 rows of icons cclloyd Jailbreaks and iOS Hacks 2 Jul 19, 2012 06:42 PM
Reordering rows in a view-based NSTableVIew monsieurpaul Mac Programming 2 Jul 19, 2012 08:21 AM

Forum Jump

All times are GMT -5. The time now is 08:46 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC