Search Results

Search found 15866 results on 635 pages for 'iphone 4g'.

Page 214/635 | < Previous Page | 210 211 212 213 214 215 216 217 218 219 220 221  | Next Page >

  • Writing photos (and other things) to disk and getting them later in iphone

    - by ebabchick
    I'm trying to write an image to disk: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsPath = [paths objectAtIndex:0]; NSString* savePath = [documentsPath stringByAppendingPathComponent:@"photo"]; BOOL result = [data writeToFile:savePath atomically:YES]; if(result) NSLog(@"Save of photo success!"); Then, later, I try to retrieve for a table view cell image: NSData* getPhoto = [NSData dataWithContentsOfFile:[leaf content]]; UIImage* myImage = [UIImage imageWithData:getPhoto]; cell.imageView.image = myImage; Yes, I checked to make sure the [leaf content] returns the same NSString as savePath. What else could be the problem? [NSData dataWithContentsOfFile:[leaf content]]; returns nil.... Thanks guys

    Read the article

  • Sending array through email on iphone

    - by thary
    Hey guys I need to send the content of an NSMutableArray through email. I have a mailing function but I'm not sure on how to place the content of the array into a NSString to be displayed on the email under each other. Is there a way to place all the content of the array into the string with maybe HTML nextline command between each array element? NSString *emailBody = @"Need to put the body here"; Thanks

    Read the article

  • Minimum and maximum Date in date Picker in iphone

    - by Iphony
    I want to get minimum and maximum date from date picker but minimum date should be "- 18" of current date and maximum date should be "- 100" of current date. Suppose current year is 2018 then I want minimum date 2000 and maximum date 1918. what I have done so far is : NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSDateComponents *components = [gregorian components:NSYearCalendarUnit fromDate:[NSDate date]]; NSInteger year = [components year]; int mindt = year - 18; int maxdt = year -100; // NSDate * MinDate = [components year] - 18; // NSDate * MaxDate = [components year] - 100; // self.datePicker.minimumDate = MinDate; // self.datePicker.maximumDate = MaxDate; but I cant get this integer to my date formate.. pls suggest any way ...

    Read the article

  • document directory for different iphone app targets

    - by David
    I have two targets for my app which both unarchive serialized objects, however the objects made by the two apps are not compatible. these objects seem to be saved to the same document directory so that one app will try to unarchive the other's objects. how do I get the apps to create separate sandboxes so they do not have access each others' saved objects? or do I need to just have each version create differently named files?

    Read the article

  • iPhone Application failing to come back from sigkill

    - by overscore
    I have no idea if this is intended behaviour, but whenever the application exits (say, the user is double-clicking the home button and pressing on the red dash on the icon) I get the dreaded SIGKILL. Now, when I try to launch the app again all I get is the old screen state and a frozen (I presume ?) program. It could be because of clunky memory management, but NSZombieEnabled doesn't seem to agree. Any thoughts ?

    Read the article

  • problem with selector in iphone?

    - by abhiTouchmagic
    i am having a application where i am generating the uibuttons dynamically want to use same @selector...Now as sooon as event is generated i wanna check for values and pass it to thtroughthat selector how can i implement this code? can anyone tell me a tutorial sort where buttons are dynamically generated and check for particular button click is depicted? Plz help...

    Read the article

  • iPhone SDK: How to determine keyboard type within a UIKeyboardDidShowNotification?

    - by iPhone Developer
    Hello, I need to know the current keyboard type. I was setting an instance variable in - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField However, testing has shown that this is not always reliable because of the asynchronous nature of notifications. What I am wondering is if anyone can tell me how to determine the current keyboard type within a notification? - (void)keyboardDidShow:(NSNotification *) { // Need way to determine keyboard type here } Thanks.

    Read the article

  • Retaining objects in game iphone

    - by Brodie4598
    Hello - I am trying to create a game and have run into what is probably a pretty easy problem to solve. As the player goes through the game, many objects (Vehicle) will be added and removed. The Vehicles get added to an array called currentVehiclesMutableArray. My problem is I cant figure out how to retain a Vehicle so that it remains in the array until I am finished with it.

    Read the article

  • iPhone - Create not persistant entities in core data

    - by ncohen
    Hi everyone, I would like to use entity objects but not store them... I read that I could create them like this: myElement = (Element *)[NSEntityDescription insertNewObjectForEntityForName:@"Element" inManagedObjectContext:managedObjectContext]; And right after that remove them: [managedObjectContext deleteObject:myElement]; then I can use my elements: myElement.property1 = @"Hello"; This works pretty well even though I think this is probably not the most optimal way to do it... Then I try to use it in my UITableView... the problem is that the object get released after the initialization. My table becomes empty when I move it! Thanks

    Read the article

  • iPhone Saving File

    - by Kashif
    Hi, to every one, i am doing xml parsing and i am getting two text files from the server with contents i have stored the contents of the first file document directory however when parsing function call second time the contents are overwritten by second file, i don't know how to create two txt file in document directory for two different contents paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES); documentsDirectory = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"Report.txt"]; [text writeToFile:documentsDirectory atomically:NO]; [text release]; I HAVE TAKEN THE CONTENT FOR THE FIRST FILE WITH THIS METHOD.

    Read the article

  • Error of iPhone certificate

    - by zp26
    Hi, I have a big problem. I have downloed a certificate from apple site. When I put it into xCode have a warning : "A valid signing identity matching this profile could not be found in your keychain" and can't build the app. Thanks and sorry for my English XP

    Read the article

  • Change backgroundcolor for UIButton IPhone

    - by lightwave
    I have a problem. I use a Button as a BarButtonItem. It works fine so far, but my backgroundcolor works only if I click on my button. How can I make it so that my backgroundcolor will be set every time ? UIButton *redEmergencyButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; redEmergencyButton.frame = CGRectMake(100, 100, 100, 50); redEmergencyButton.backgroundColor = [UIColor colorWithRed:0.8 green:0.898039215686274509803 blue:1.0 alpha:1.0]; [redEmergencyButton setTitle:@"Emergency" forState:UIControlStateNormal]; [redEmergencyButton addTarget:self action:@selector(doEmergency) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *rButton = [[UIBarButtonItem alloc] initWithCustomView:redEmergencyButton];

    Read the article

  • Possible to alert server to iphone settings change?

    - by DougW
    I'm working on giving our users context-specific PUSH notification settings, similar to what Facebook has in their settings menu. As far as I can tell though, there's no way to actually notify our server of these changes until the user actually launches the app. Is this correct? Is there any mechanism provided for immediately alerting our servers to a settings change?

    Read the article

  • Iphone Orientation Change

    - by SG
    I am trying to implement orientation change functionality in my application.I have overrided -(void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation. In this method i change the frame size of the tableview(including the position of the cell items) which is present in the view. The tableview Details: Added to the view as [self.view addSubView:tableView] in the viewDidLoad method of the view controller; Cell item (row) has a textfield and a segmented control. There are 10 cells in the table view and in landscape mode only 2 cells are visible and in potrait mode 5 cells are visible. I have implemented scroller. Issue: Certain times on changing the orientation to potrait mode certain segmented controls in the cell are not rendered (Not shown at all). This happens when i am viewing the last couple of cells in the landscape mode and i change the orientation to potrait mode.

    Read the article

  • iPhone: Get value in multi-dimentional array

    - by Nic Hubbard
    I have an array that is many levels deep and I am wondering what is the best way to get one of the child element values that is deep in my array. I assume I need to use a recursive method, but what is the best way to do this? Or is there a faster way to do this? The array comes from an XML Parser that I am using which builds everything into an array like this (using NSLog to show the structure): { children = ( { children = ( { children = ( { children = ( ); data = 12; element = AssetID; } ); data = ""; element = "ns1:GetUserIdByUsernameResponse"; } ); data = ""; element = "SOAP-ENV:Body"; } ); data = ""; element = "SOAP-ENV:Envelope"; } What I would like to get at is the AssetID data, which in this case is 12.

    Read the article

  • how to handle multiple NSUrlResponses in iphone

    - by MaheshBabu
    hi folks, i am getting data from .net web services. I am sending two NSURlrequests to the same url, But i need to save those responses separately. for that my code is -(void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)data { if (theConnection_LOD ) { [webData_LOD appendData:data]; } if (theConnection_photo) { [webData_photo appendData:data]; } } But it does n't work how can i handle these responses. can any one pls help me. Thank u in advance.

    Read the article

  • iPhone animation with stretchable image

    - by ryyst
    I got a UIView subclass that draws a UIImage as its background. The image is created using the stretchableImageWithLeftCapWidth:topCapHeight: method, it has round edges. I also use an animation block inside of which I resize my view. I had hoped that during animation, the drawRect:method would get called sometimes, which would result in the background image getting drawn correctly. Unfortunately, the animation seems to render the image and then just rescale it during the animation, which obviously makes the formerly round edges getting nastily stretched. The only workaround I can imagine is put three separate UIImageViews (top cap, middle fill, bottom cap) above my original background image and then reposition the caps images and scaling the fill image. However, this seems quite complicated... Is there any better way I can prevent this from happening?

    Read the article

  • Wildcard App IDs for iPhone/iPod Touch Apps

    - by Can Berk Güder
    I'm writing my third app, and I already have an app in the App Store, but I still don't get this App ID business. I created the App IDs for my first two applications like this: XXXXXXXXXX.me.cbg.FirstApp YYYYYYYYYY.me.cbg.SecondApp but then Apple introduced the App ID wizard, which I used to create the App ID and provisioning profiles for my third application: ZZZZZZZZZZ.* So my question is: What is the "proper" way of creating App IDs for three completely independent apps? Should I use the XXXXXXXXXX.* format or XXXXXXXXXX.me.cbg.*? Should I create three different App IDs, or just one wildcard ID?

    Read the article

< Previous Page | 210 211 212 213 214 215 216 217 218 219 220 221  | Next Page >