iphone

UINavigationController presents blank view

I have a very strange problem with UINavigationController on the iphone and I am banging my head against the wall on this. Gist of it is I am executing a call to a server and when that call fails I swap out the current view with a view containing an error message. The code in question is called on the main thread by using performSelecto...

Cannot add category to AVAudioPlayer

I'm trying to add a category to AVAudioPlayer but I keep getting the error "Cannot find interface declaration for 'AVAudioPlayer'". AVAudioPlayer+Fade.h #import <AVFoundation/AVFoundation.h> @interface AVAudioPlayer (Fade) - (void)fadeToVolume:(CGFloat)volume; @end AVAudioPlayer+Fade.m @implementation AVAudioPlayer (Fade) - (voi...

In wich way can i debug "accessoryDidDisconnect" notification if unplug the external device?(EAAccesory Framework))

Hi, i'm starting with EAAccessory framework and i don't know in wich way can i debug this method if unplug the external device: - (void)_accessoryDidDisconnect:(NSNotification *)notification Obvisouly xcode gave me an error for the disconnection of the iPhone and i can't enter in the method. Thanks ...

iBooks like PDF reader for iPhone

Does anyone know of an open source project or code samples that works like the PDF reader in iBooks? ...

Mapkit accessory button issue

im trying to get the index of the annotation when the disclosure button is tapped using the (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { i have been pointed to the control.tag property, but whenever i use NSLog(@"tag value from control: %d", control.t...

Resetting a view

When the user navigates to a different view and returns back to the original view I would like everything to be reset as though they were coming to the view for the first time. I was able to stop the audio from playing when they leave, but not an animation method. how would I be able to do this? -(void)viewWillDisappear:(BOOL)animated ...

Write from textfield to array for uitableview objective c iphone

What i want to do is have a textfield on the screen and a table below it, when the user enters something into the textfield, i'd like to write that value into an existing array, which is being used to populate the table? Can someone help me out with this one please? Thanks alot ...

How can I rename my project?

I have a lot of code that I've written, and finally have come up with the correct branding. How can I rename my project and app in XCode? ...

iPhone - Core Data Question ??

I have 2 entities : User, Address. I have set the relationship each User can have many "Address". I am not sure how core data works but from my understanding, every time i call insertEntityForName it creates and stores an object. (also a row in table) So the question: Doesn't the following code store a duplicate address in core data? ...

Free bitmaps for iOS custom buttons and sliders?

First, I'm not talking about icon libraries or mockup tools/libraries. I'm familiar with various icon libraries that people have created, but other than the stuff from the example code like UICatalog, I'm wondering if anyone knows of anyone who has created free libraries of custom button bitmaps (stretchable button images), slider handl...

Some questions about the App Store review guidelines?

I've made some iphone webapps before, using jQTouch and iUI but now i want to try out making a native Apps for iPhone. As i first step i thought of trying to port one of my webapps using Phonegap. So far it works well, but i'm a little concerned about some things in the Apple Review Guidelines and wanted to see if anyone have prior exper...

"initializer element is not constant" when declaring an array

Hello, This is how I declare my array : NSArray *atouts = [[NSArray alloc] arrayWithObjects:@"1",@"2",nil]; but I'm getting : Initializer element is not constant What would be the best way to declare a static array then ? ...

UIPicker in Actionsheet

I am trying to implement a UIpicker with numeric values in a Actionsheet on a text box event. When the user touches the text box, i want the UIpicker to pop up and allow a user to select a value. Do i have to declare the values in a array or is there some other way to do that? ...

Objective-C blocks -- EXC_BAD_ACCESS if I call block directly?

Continuing to try to understand blocks in Objective-C. I have the following function: typedef void(^TAnimation)(void); TAnimation makeAnim(UIView *aView, CGFloat angle, CGFloat x, CGFloat y, CGFloat width, CGFloat height, UIInterfaceOrientation uiio) { return Block_copy(^{ aView.transform = CGAffineTrans...

How to implement HD "Retina Display" graphics in Cocos2D

Hello, I am not quite sure how use HD images for sprites in cocos2d. I looked through the documentation, and downloaded the newest beta which supports points instead of pixels, but I don't understand the whole -hd suffix idea. In other word I need help and have no idea how to use retina quality graphics in my cocos2d game. I feel tha...

Is there a View Controller to show thumbnails like the Photos app?

I am looking to replicate the image gallery view that shows thumbnails, like in the photos app on the iPhone. Is there a view controller or any examples that anyone can provide to replicate this? ...

Adding @Property UISwitch to TableView Causes RetainCount Problems

I am doing this with UISwitchs and UITextFields... I have declared the UISwitch as Property in the header file, because I want to access its value in several different methods within my class. I am adding the UISwitch to one of my TableViewCells, using the following code: - (UITableViewCell *)tableView:(UITableView *)tableView cellFo...

Problem parsing following JSON with JSON Framework

I have the following json: { "response": { "status": 200 }, "user": { "flex_meta": { "layout": "[{\"windows\":[{\"type\":\"stream\",\"width\":260,\"x\":268,\"height\":763,\"y\":0,\"relatedDataObject\":{\"name\":\"watch\",\"id\":3190},\"arg\":\"watchlist:3190\"},{\"type\":\"rss\",\"width\":260,\"x...

Using CGContextDrawTiledImage at different zooms causes massive memory growth

I'm working on app an where there's a view in a zoomable UIScrollView. When the user zooms in or out, I redraw the view that's in the UIScrollView to be nice and sharp. That view has a background image that I draw with CGContextDrawTiledImage. I noticed that memory usage grows every time I switch to a new zoom level. It looks like CGCon...

Breaking a for loop during enumeration (Objective C)

I'm enumerating a dictionary and checking for a known date. If the exact date (both date and time) matches my known date, I want the for loop to stop enumerating. THe issue I'm having is that during the check, I break out of the if statement instead of the for loop. //known date has already been applied to self.knownDate for (id objec...