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 10-21-2010, 08:25 PM   #1 (permalink)
Registered Member
 
Join Date: Aug 2010
Posts: 236
lilzz is on a distinguished road
Default [self.view retain] is not working!

when the camera shows up by [self presentModalViewControllericker1 animated:NO], the system automatically calls viewdidunload,

I don't want the view of viewcontroller being unloaded so I did [self.view retain] but it didn't work. It still got unloaded.

So, how can retain the view of the viewcontroller?
lilzz is offline   Reply With Quote
Old 10-21-2010, 09:50 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2009
Location: Tasmania, Australia
Posts: 195
Son of a Beach is on a distinguished road
Default

Are you sure that the retain count is your problem? It may just be that you no longer have a reference to the view. Ie, the view may well be retained, but is no longer pointed to by self.view (which may be nil, or something else, now).
Son of a Beach is offline   Reply With Quote
Old 10-21-2010, 09:54 PM   #3 (permalink)
mr.
 
refreshe's Avatar
 
Join Date: Jul 2008
Location: SF, California | Melbourne, Australia
Posts: 346
refreshe is on a distinguished road
Default

views are unloaded during a low memory warning. The modal probably triggers the warning.
You might be able to avoid the view unloading by not having the memory warning called on the controller (overriding didReceiveMemoryWarning and not calling super(?)), but it'd be better practice to handle the memory warning properly and letting your view unload, and then recreating when viewDidLoad is called again.
__________________
appz
refreshe 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: 338
11 members and 327 guests
condor304, Desert Diva, Domele, dre, dreamdash3, mottdog, oceanlablight, palme2elie, Paul Slocum, schmallegory
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,659
Threads: 94,118
Posts: 402,895
Top Poster: BrianSlick (7,990)
Welcome to our newest member, dreamdash3
Powered by vBadvanced CMPS v3.1.0

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