Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>First Of all Try to post some code of ur problem. it makes us help u better. </p> <p>Okay from what i have speculated the problem is that u are loosing the image when u push to the new view . well i had this problem and i solved it using Singleton Class. it sorta create Global elements and u can store values which u prefer to hold. including Images, Class Objects (u name it)</p> <p>U can hold as much values as u want and u dont even have to store it in ur Library.</p> <p>Try Reading Singleton Classes On Internet i m sure our good friend Google will certainly help u out</p> <p><strong>EDITED -------- About SINGLETON</strong></p> <p>okay since u have read about Singleton. u might have notice why do we use Singleton Classes, The Major purpose of Singleton is to hold global variables, but u know that dont u.!!! so about ur issues, when u pick an image (either from Camera or Photo Galary) it will return to u an Object of UIImage. </p> <p>u must have a Class of Singleton Some thing Like</p> <pre><code>#import &lt;Foundation/Foundation.h&gt; @interface Singleton : NSObject { //Global Variables //UImage Instance that will Store The Image From Picker UIImage *photoPicked; } //Getter And Setter @property (nonatomic,retain) UIImage *photoPicked ; //Shared SIngleton CLass +(Singleton*)sharedSingletonController; @end </code></pre> <p>And the M file will look something like this</p> <pre><code>#import "Singleton.h" @implementation Singleton @synthesize imagePicked; //Class Function For SingleTon +(Singleton*)sharedSingletonController{ static Singleton *sharedSingleton; @synchronized(self) { if(!sharedSingleton){ sharedSingleton = [[Singleton alloc]init]; } } return sharedSingleton; } //I don't want a re-initialization for these variables -(id)init{ self = [super init]; if (self != nil) { } return self; } @end </code></pre> <p>now all u got to do is to call the sharedSingletonController function in the class where want to use the singleton Image variable like and yeah dont forgot to create an Object of Singleton Class</p> <p>Some thing like that</p> <pre><code>Singleton *yourSingletonObj = [Singleton sharedSingletonController]; </code></pre> <p>now u can store ur image in singleton like</p> <pre><code>yourSingletonObj.image = (YOUR IMAGE FROM PICKER); </code></pre> <p>Now the image will be saved in ur Singleton object. So when it will not be lost and u can use it anytime u and in any class u like</p> <p>Cheers Let ME Know if it Worked W</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload