iphone

@property @synthesize

can someone please explain why you do @synthesize and @property things on xcode? like, in really simple terms. im so new to this, and dont really get it. cheers Sam ...

Recognising iPhone Silent Mode

Hi, I would like to stop my application playing a sound if the user has switched the iPhone to silent mode. Where can I read that the phone is in silent mode? Is there some flag I can query? I noticed that some applications ignore the silent mode and some not, while I would have expected all apps to respect that silent is silent !! Any...

Memory footprint of an app on iPhone

I recently had an app rejected from the app store because of Low Memory Exception. The app doesn't leak memory, but its base memory footprint seems to be too high. According to the crash logs sent by apple, it was taking about 14000 pages in the memory (mostly due to huge textures). There were 2 strange things though: I tested it on 5 ...

make a vertical UIButton

is there anyway to have a UIButton display vertical, with the text reading down, instead of across? can you do it with IB or programatically? or will you have to photoshop to make a custom button? cheers, Sam ...

iPhone programming

hi all, i try to display UIImage from url in tableview cell but it's not scroll soomthly. at time to scroll image is not cashed and every time its goes to url to display and scroll is stick some while [cell setProductImage:[UIImage imageWithData:[NSData dataWithContentsOfURL:[NSURL URLWithString:[dict_productinfo valueForKey:@"product...

Sorting in NSMutableArrary in iPhone

Hello, I am parsing an XML and storing all data in NSMutableArray in form of Dictionary. NSMutableArray * stories; // a temporary item; added to the "stories" array one at a time, // and cleared for the next one NSMutableDictionary * item; - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:...

How to insert an object at a given index in iphone-sdk

I want to insert a object at a given index. and If Is there no object at the index, I want to know that. Is NSDictionary good choice? Is there another good solution? // Initailization NSMutableDictionary *items = [NSMutaleDictionary dictionary]; ... // insert an object. [items setObject:item forKey:[NSNumber numberWithInt:3]]; ... // ...

Getting NSManagedObject from another NSManagedObjectContext (referring the same NSPersistentStoreCoordinator)

Hi, i have got two different NSManagedObjectContexts both referring to the same NSPersistentStoreCoordinator, say context1 and context2. I have an NSManagedObject out of context1. As I would like to edit it, not knowing whether it will be saved afterwards, I would like to get that object from context2. Context2 could be just trashed in...

Is the ASIHTTPRequest is not asynchronous ?

Hi all , I am using ASIHTTPRequest to fetch some data from a web service. I am making requests using a loop. The problem is that it doesn't seem the request is going asynchronously so that my activityindicator is not working . Is it true that ASIHTTPRequest is not asynchronous . or should i use the regular nsmutablerequest to perfor...

CGContextSetLineWidth(context, 1) - the width is almost alwayas at least 2 pixels instead 1

With CGContextSetLineWidth(context, 1) the width is almost alwayas at least 2 pixels instead 1 QQCandleStickLayer.m -(id)init { self = [super init]; if(self != nil) { self.delegate = self; self.opaque = NO; } return self; } - (void)drawLayer:(CALayer*)layer inContext:(CGContextR...

Launch event / Delegate once finished parsing a XML

Hello! The thing is I'm new on iPhone and Objective C development and I'd like to know what's the best way to call some function once you finished a task. In my application what I do is load an internet hosted XML with some vars. To do this I have created this function called by the main view: ApplicationVariablesLoader *loader = [ [ ...

CAShapeLayer slowing down interface rotation

Hi, I am trying to move some custom drawing code from a view into a CAShapeLayer, which then get added as a sublayer to the original view's CALayer. This also works well, but when rotating the device, the animation starts to stutter, e.g. you just see the frame in the original orientation and then the final orientation, with at most one...

Instance of the ViewController

Hello! I want to access the current ViewController. I have a TabBar with a NavBar and there is a ViewController in it. In this ViewController (TableView) I made a "pushViewController" to a new ViewController. How can I access this one in another class. If I do: [(MyTestDetailViewController *)[[(UINavigationController *) [appDelegate....

self.view = aViewController.view vs [aViewController loadView] -

Hello everyone, I am trying to understand the behavior of view controllers when switching from one to another (displaying different views) A part form the addSubiew statements which seem to work, I can't find an explanation to what happens with the two statements: self.view = someViewController.view; [someViewController loadView]; In...

UIImageView renders image differently to original

The image on the right is the one that I produced in photoshop. I then stripped all text and put it in an image view, as soon as I did that there was a change in colour and the vertical line lost it sharpness. Has anyone else run into a similar problem? What do I do? ...

retrieving data from url in iphone

Hi, i have a php page that connects to a database and retrieves data from a table given a GET parameter, suppose one would retrieve a list of shirts given a color: select * from shirts where color = $_GET[color ; I want form the iphone to make a request to that page, (sending that get parameter) and retrieve that data for using it in ...

How to: Save order of tabs when customizing tabs in UITabBarController

I am having problems finding any other information than the docs for how to save the tab order for my UITabBarController, so that the user's customization is saved for next app launch. I have searched online, but have been unable to find any blog posts or articles that goes through the proper code for doing this. I realize I have to use...

iPhone: How to take a picture programmatically without buttons or displaying extra views?

This question or similar has been asked before but from the responses I saw none answered the questions sufficiently. I'll describe what I'm trying to do and I'm basically looking to see if it is possible, and if so, a suggested approach would be much-appreciated. I'd like to take a picture from the iPhone that is triggered with a gestu...

How to make iphone apps in two different languanges?

Hey guys I was just wondering how to make apps in two different languages? I think that I should create two files with all the variables in different languages each. Is that right? Help please Best Regards Carlos Vargas ...

Another take on the "keyboard obscures UITextField" problem

Hi All, I know that this is a common problem and the UITableViewController fixed this is iPhone SDK 3.0, but the UITableViewController is not working as I expect, probably due to how I am using it. Here's my problem: I'm working on a form, which is in a grouped table, which contains some text fields. Those on the lower part of the form...