Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 02-06-2012, 01:02 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 3
Anahtarcı is on a distinguished road
Exclamation ModalViewController is not working from UITableView

Hi guys i have a problem with UITableView,

almost one week i am trying that and i am really tired .)
i cant open a UIModal Presentation form sheet from tableview.

only opening full screen modal view, not pagesheep.
what i must to do fot that?

here my code in didSelectRow

Like that opening a viewcontroller, but i am not sure that i mine. Because when working there is dont have any object what is have in desing time.

Code:
viewDetail *hd = [[viewDetail alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:hd];

hd.modalPresentationStyle = UIModalPresentationFormSheet;
[self.navigationController presentModalViewController:nav animated:YES];

[hd release];
[nav release];
when trying to open with that
Code:
viewDetail *hd = [[viewDetail alloc] initWithNibName:@"viewDetail" bundle:nil];
then time SIGABRT error

note : i am using xcode 4.2 with storyboard features
Anahtarcı is offline   Reply With Quote
Old 02-08-2012, 10:39 AM   #2 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 3
Anahtarcı is on a distinguished road
Thumbs up

i fixed my solution for now with a xib file out of storyboard. But this is not really what i want. Just want use my view in storyboard.
Anahtarcı is offline   Reply With Quote
Old 02-08-2012, 02:58 PM   #3 (permalink)
Cocoa Junkie
 
Duncan C's Avatar
 
Join Date: Dec 2008
Location: Northern Virginia
Posts: 6,003
Duncan C has a spectacular aura about
Default

Quote:
Originally Posted by Anahtarcı View Post
Hi guys i have a problem with UITableView,

almost one week i am trying that and i am really tired .)
i cant open a UIModal Presentation form sheet from tableview.

only opening full screen modal view, not pagesheep.
what i must to do fot that?

here my code in didSelectRow

Like that opening a viewcontroller, but i am not sure that i mine. Because when working there is dont have any object what is have in desing time.

Code:
viewDetail *hd = [[viewDetail alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:hd];

hd.modalPresentationStyle = UIModalPresentationFormSheet;
[self.navigationController presentModalViewController:nav animated:YES];

[hd release];
[nav release];
when trying to open with that
Code:
viewDetail *hd = [[viewDetail alloc] initWithNibName:@"viewDetail" bundle:nil];
then time SIGABRT error

note : i am using xcode 4.2 with storyboard features

Your code is a mess.

You should not try to create a new navigation controller and present that as a modal.

Present the the view (viewDetail?) as a modal view controller directly, on self (the current view controller.)



Code:
viewDetail *hd = [[viewDetail alloc] init];

[self  presentModalViewController: hd animated:YES];
[hd release];
Your code did not show any mechanism for configuring your viewDetail controller. You probably want to pass the selected row/section that the user tapped to the view controller you are presenting modally.

You should probably post the header for your "viewDetail" class.

Also, as a style note, class names should always start with an upper-case letter. Thus, viewDetail should be "ViewDetail". That is a very strong convention in Cocoa programming.

EDIT: I originally wrote the above about class names wrong. Domele caught my mistake, so I fixed it. Class names should start with an UPPER case letter.
__________________
Regards,

Duncan C
WareTo

Check out our apps in the Apple App store


Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.

See this tutorial on using UIView animations and layer animations:

See this thread on generating random, non-repeating text

Check out a very cool Macintosh Kaleidoscopes app called ScopeWorks that we released to the Mac App store.

Last edited by Duncan C; 02-09-2012 at 06:32 AM.
Duncan C is offline   Reply With Quote
Old 02-08-2012, 03:11 PM   #4 (permalink)
Registered Member
 
Join Date: Feb 2012
Posts: 3
Anahtarcı is on a distinguished road
Default

Thank you @Duncan C. no viewDetail is not my real view class name, just for example i gived a name like that.

I will try your advice,
thanks so much.

Edit; Yeah that was great. Working .)
thanks again.

Last edited by Anahtarcı; 02-08-2012 at 03:21 PM.
Anahtarcı is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 403
16 members and 387 guests
Alex-alex, Apptronics RBC, dre, FrankWeller, gwelmarten, ipodphone, jeroenkeij, jleannex55, MAMN84, n00b, pbart, reficul, Retouchable, Sami Gh, usernametaken, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,676
Threads: 94,125
Posts: 402,910
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jleannex55
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:17 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0