iphone

How to check if a new contact is added to the address book?

Hey, I'm saving a copy of all contacts in a database. Upon launching, I want to check if there is a new contact in the address book in order to add it to my data base. How to perform this check? I can't find the suitable logic to implement it. ...

exception thrown trying to insert new table row into section

I seem to be encountering a very odd problem which only occurs when trying to insert a new NSManagedObject into a new section. Basically my sections are days and individual cells are associated with times. When I MOVE an object to a day which doesn't currently have another object (table row) associated with the day, the table needs to cr...

UIBarButtonItem is not working

I change the UIBarButtonItem title at run time but it does not work if(self.toolbarItems!=nil) { NSArray *toolbaritem=self.toolbarItems; UIBarButtonItem* tmpeditButton =[toolbaritem objectAtIndex:0]; tmpeditButton.title=@"Done"; NSLog(@"log %@",tmpeditButton.title); } Log is always displays the ...

One App, Multiple Branding

I have made an application for the iPhone but it is required to be released with multiple brandings. Eg Differernt: App Name Icons Default.png Text replaced for the app name in IB Colour schemes for all images such as backgrounds, icons etc I'm not sure of the best way to do this. I was thinking of a plist file for each branding th...

NSString drawInRect with UILineBreakModeTailTruncation doesn't appear the "..."

I am trying to use this method to draw a string into a custom UITableViewCell. [self.text drawInRect:TEXT_RECT withFont:font lineBreakMode:UILineBreakModeTailTruncation alignment:UITextAlignmentLeft]; The problem is that if the text is too long, the text is actually tail truncate but it doesn't display the "..." If I use the draw...

problem installing CorePlot

I attempt to install CorePlot according to the readme file, but as soon as I add $HOME/Library/SDKs/CorePlotSDK/${PLATFORM_NAME}.sdk to Additional SDKs in the project settings I get a massive spew of compile errors trying to compile the PCHs. I've followed the rest of the install procedure and I continue to see this problem with header ...

Decoding a H.264 video using AVFramework and diplaying it in media player

Hi, I need to decode H.264 format videos which is encoded in the server end. I found similar link which talks about it and this is the task I need to do to decode the video. http://stackoverflow.com/questions/3142439/streaming-live-h-264-video-via-rtsp-to-iphone-does-work-w-example I am not sure whether this is the best way of doing ...

How do I populate a NSMutableArray with UILabels?

I don't think I am creating this array of UILabels correctly. If I put a breakpoint after this line of code, it shows that the array is empty. colorLabelArray = [[NSMutableArray alloc] initWithObjects: greenLabel, orangeLabel, blackLabel,purpleLabel, yellowLabel, redLabel, blueLabel, whiteLabel, nil]; If I do the same thing with UI...

UITableView Scroll is not work in inside UIScrollView

I add UITableView inside UIScrollView. It's working fine. UITableView width is 1200. I move scroll to over 320 , I can't scroll and click in UITableView. Between 0 and 320px, it's working fine. Over 320, UIScrollView is dragging the UITableview and can't scroll and can't clik ,too. Edit: I add scrollview.contentSize = CGSizeMake(1200...

MPMoviePlayerController play 3gp file

Hello everyone I noticed that the app below can play 3gp file using MPMoviePlayerController http://itunes.apple.com/ca/app/pdf-reader-file-scanner-file/id325924458?mt=8 I hope add the function to my app and play more type of video. I guess the app above add some plugin for MPMoviePlayerController. Welcome any comment Thanks ...

Creating a list of entity parents using a core data fetch request/predicate.

I have a core data model, using the database store, that contains entities with classic parent/child relationships. Each parent has a number of children, each child a single parent, creating a multi-level hierarchy. What I would like to do is use a predicate in a fetch request to return a list of all the entities between a given entity...

passing cyrillic characters in URL parameter in iPhone app.

I need to pass cyrillic characters as a parameter in a URL in my iPhone app. A sample URL looks like: http://www.mysite.com/script.php?message=страшная When I use this URL in my browser, it returns the correct result. However, in my app, the cyrillic is not liked, and I end up getting a "bad url" in the didFailWithError code. I have...

Duplicate interface declaration for class 'Foo'

I was working on my program, and it seems something in the settings changed. Suddenly I have the error "Duplicate interface declaration for class 'Foo'". It mentions a header file being duplicated but there's only one copy. Interestingly this is only happening in debug mode, not device mode. Does anyone have any idea what might be wron...

how to autoplay next song in music application when first song completes playing

Hi to all, I have made a music app using avtouchController & I want to play my next song one after the other using autoplay can u please give me the step to autoplay a song. ...

iPhone memory warning guidelines

Are there any specific guidelines of what to do if you get a memory warning? I know that you have to try and kill off objects that aren't required, but if this makes your application inoperable, what other options are there? An example might be if say the application was Apple's contacts app and the user is editing a person's contact d...

Core Animation and drawRect:

Hello, I have a UITableViewCell drawn using drawRect:. I'm drawing an shape in drawRect and would like to animate this shape (using some parameter) when using the cell goes into edit mode. However, I couldn't find how to use animated parameters within drawRect. Could someone point me to the right documentation or is it impossible? Tha...

Radial gradient draw performance - Can OpenGL-ES improve?

I'm working on a image manipulation app that overlays a radial gradient over an image loaded from the photo library. On screen I have a slider to dynamically in/decrease the radius of the radial gradient. I've found the performance on the simulator to be just fine, but on an iPhone 3G or 3GS it is much slower to redraw when moving the s...

How to parse the following XML?

<colors> <color colorName="Abracadabra" colorNumber="D51-2" rColor="209" gColor="224" bColor="229" colorCollection="Harmony" colorFamily="Shaded" rating="3" surfaces="" colorGroup="Blues" /> <color colorName="Abyss" colorNumber="B50-1" rColor="233" gColor="247" bColor="249" colorCollection="" colorFamily="Clean" rating="3" surfac...

Releasing object due to retain count

Hi all, I have an issue with releasing a view too many times. Although simple in theory because im moving uiview to uiview, which is a subclass of uiview and being animated and so on its not something that I can easily fix. It only crashes 10% and only under certain conditions and only 30% of the time even under these conditions. So i...

remove replication of data in UItableview Section on iphone

in order to remove the duplicate data in table section view i am doing this now i dont know whether this is good or not so kindly help - (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath { //UILabel *labelb; UILabel *labela; UILabel *labelt; static NSString *FirstRowCellIde...