iphone

Profiling iphone with shark: Nothing happens after pressing start

I have used shark in the past with Mac applications. I am now trying to set it up for the iPhone but it doesn't want to work. I have followed these instruction from another post: Build app and launch on device - Launch Shark - From the Shark menu, select Sampling->Network/iPhone Profiling - In the Shark window, select the radio button ...

Entering background on iOS4 to play audio

The documentation is rather poorly written when talking about playing audio in the background. It gives the impression that all you have to do to continue playing the audio that you are currently playing is to just add a key/value pair to the info.plist file and wallah, it's magic. However, this is not the case. For instance, if I pla...

EXC_BAD_ACCESS On reading and writing to plist files.

I'm getting tonnes of EXC_BAD_ACCESS errors related to the following two functions for reading and writing to plist files. I think its memory related. Any suggestions? +(NSString *) getSettingString: (NSString *)key defaultValue:(NSString *)defValue { NSArray *pathArray = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUs...

Get URL File Size before parsing

Me again! I am using NSURL to get a file then parse it. I have been looking for a couple of hours now on a progressbar i am trying to implement in my app. I know I first need to get the file size, then keep updating how much data i've downloaded as I continue to pull. I have seen the example using "ASIHTTPRequest" but is there a way to d...

IOS4 NSDateformatter return nil, before in 3.1.3 OK

I know there are a lot of answers about that problem, but I need someone explain me easy, why on SDK 3.1.3 the code bellow returns the correct result, and in the same code in IOS4 return nil. Thanks a lot for any suggestion. Marcello NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init]; [dateFormatter setDateFormat:@"yyyy-...

Fetching and sorting across entities in Core Data

Lets say I have a model similar to the one below, and I need to Fetch all 'Person' of a specific Company.companyName sorted by personRole.roleWeight This is the model I have at the moment: Entity: Company Attributes: companyName Relationships: companyRole Entity: Role Attributes: roleName, roleWeight Relationships: rolePerson, Rol...

How can I use drawRect to load an image in a UITableView

I have a grouped UITableView with some large images. However, scrolling performance is quite poor (note: it was excellent before the iOS 4 upgrade, now it's very jittery). I've read that using drawRect instead of adding subviews to the cell could improve performance. First question: Is that true? Second question: If it will increase p...

toolbar on top of the keyboard with firstresponder

This is a pretty common topic and has many answers out there. Situation: I have a full screen (minus toolbar) UITextView with a UIToolbar at the bottom. when the UITextView gets first responder I want to have the toolbar slide up with the keyboard and add a "done" button which will dismiss the keyboard. So far: I have this completely ...

Changing background images of UIView.

I have a class : @interface UIExView : UIView { ....... } In another class, UIExView is defined as following: IBOutlet UIExView* exView; exView is connected to an View in XIB. I set background image of exView as: UIColor* bgrColor = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed: backgroundImageName]]; exView.backgroundCo...

UIButton image/background image weirdness

I have a custom UIButton in my viewcontroller that should have either the image of either a red or blue heart depending on the value of a variable when the viewcontroller is loaded. If the user clicks on the button, it changes the Red/Blue value in the domain model and should also toggle the button image. The button color will load corre...

iPhone App compatibility between different OS versions

Currently, I have an iPhone app published in AppStore. I've developed it using XCode 3.1.4 and compiled it under the iPhone SKD 3.0. At AppStore the application shows 3.0 as the minimum OS required. Everything is fine. Now, I have downloaded the XCode 3.2.3 and I want to send an update of my app with compatibility for iOS 4. My questio...

'NSString' may not respond to '-hexIntValue' warning, function works fine

I'm taking a hex color value received as a string and converting it to an int so that I can get the proper hex values. I have the following code underneath my imports: @implementation NSString (HexIntValue) - (unsigned int)hexIntValue { NSScanner *scanner; unsigned int result; scanner = [NSScanner scannerWithString: self...

iPhone - App Rejected again, HTTP Live Streaming 64kbps baseline feed

Thank you for submitting APPNAME_HERE. We have reviewed your application and have determined that it cannot be posted to the App Store at this time because it is not using a baseline stream of 64 kbps for the HTTP Live Streaming protocol to broadcast streaming video. HTTP Live Streaming is required when streaming vide...

apple push notification with APNS sharp.

i use APNS Sharp library for my apple push notification. i have downloded from Here.i use sample test program provided by APNS sharp library without any modification. it simply does not send any notification until i put break point at that line of code. if i put break point. i just work fine.is this expected behaviour or i am doing somet...

Creating a single JSON Parser/Network object

Hello, What I'm looking for is a point in the right direction of helping me create a better concept of what I need to do within my application design. What I'm trying to do is have a class that will make network requests, IE: getUser, getTimeline, getLocation. Once the data has been recieived via -(void)connectionDidFinishLoading: have...

Custom Annotation View's image does not appear on device build in MKMapView

I am using the iphone sdk and trying to use a custom image for my AnnotationView on my MKMapView. My approach works fine for another screen in my app, but for the problematic one, I see the image in the simulator but not on the device. I basically create a custom view like this: @implementation CustomAnnotationView - (id) initWithAnn...

How to get center of an MKMapView map?

I have an MKMapView which allows the user to scroll the map around. Later, I want to get the latitude and longitude of the point at the center of the map, but can't find an easy way to do it. At the moment I'm trying something like: CLLocationCoordinate2D centre = [locationMap convertPoint:locationMap.center toCoordinateFromView:locatio...

Changing title of UINavigationBar Created in Interface builder and General UINavigationBar logistics

Hey all, the issue is that I have created a UINavigationBar in interface builder and I want to change the title. The Navigation bar is not hooked up to my UINavigation controller. Is there any way I can accomplish this with the Navigation Bar as a stand alone from my Nib? The second part of my question is more a general understanding of...

Using selectors for callbacks?

hi, I think i should be using selectors (or even a different paradigm), but even after R'ing TFM I can't figure out what i'm supposed to do. It's all related to callbacks from a delegate I have my main Model object: @implementation Model @synthesize myConnection; // which is an NSURLConnection ... -(void)someMethod{ ...

How to add another annotation in the mapview a certain distance from current location

Wondering how to add another annotation in the mapview a certain distance from current location? ...