iphone

UIDeviceOrientationDidChangeNotification won't stop

Hey, I've got a little problem using UIDeviceOrientationDidChangeNotification. After I leave a certain ViewController (the viewWillDisappear: method is called), the device won't stop to send notifications. This means, after I pushed another ViewController on top of the stack and I rotate the device, the receivedRotate: method of the Vi...

unable to fetch related records in relationship in coredata , why ?

Hi all, I have to entities namely 'account' and 'event'. The account has to-many relation to event and inverse to-one from event. Now when I save a event object to account it is working nicely. But when I fetch for events for particular related account it gives all the entities available which is not desirable behavior. I am passin...

SOAP action in iphone

I am using thid code in android,I need the same code in iPhone..with appropriate syntex NSString *soap = soapStart + "<" + soapAction + " xmlns:m='http://www.aras-corp.com/'&gt;" + body + "</"+ soapAction + ">" + soapEnd; error appers on screen "invalid operands in binary +(have struct 'Struct NSString*' ans 'char *' I am first time...

best way to sort NSArray

i have NSArray which have dictionary object and in dictionary for "ORDER " key i want to sort array. any suggestion? ...

Scrollview+Webview Touch event

hi i have a scroll view and on that number of webview no i want to know how i get touch event of webview ...

application crashes while running on device due to sqlite assertion

HI I have developed the application on with sqlite Database .when i run the application in simulator it works perfect but when i tested with device application gets crashes. this is my code * Assertion failure in -[sampleProjectAppDelegate copyDatabaseIfNeeded], /Users/xxxx/Desktop/new/sampleProject/Classes/sampleProjectAppDelegate.m:...

Adding a UIImage from the UIImagePickerController to a UIButton

Hi there, I have a UIButton which the user clicks on to bring up a UIImagePickerController. Once this has processed it returns an edited UIImage to a delegate handler, which then is supposed to populate the UIButton with the new image. In practise, however, what happens is if the user selects an image from their library, it works fine....

NSDictionary losing its contents (exc bad access)

Hi So i have a uiviewcontroller. It has a property of an NSMutableArray with a nonatomic, retain property synthesized. In the viewDidLoad I init it with the following, and also add a button to the nav bar. test = [NSDictionary dictionaryWithObjectsAndKeys: [[SearchField alloc] initWithName:@"Subject" :Text], kSubjectKey, ...

When should uiviewcontrollers be declared as properties

Well this has been bugging me for quite a while so now i'll ask When should uiviewcontrollers be declared as properties? I noticed that in many examples uiviewcontrollers that are being pushed and popped on a uinavigation controller are not declared as properties. I took that forward and now every uiviewcontroller i use inside my code ...

cocos2d circular edge

Hi, i am using the following code to draw a circular edge in scene. // Create edges around the entire screen b2BodyDef groundBodyDef; //groundBodyDef.position.Set(0,0); b2Body *groundBody = _world->CreateBody(&groundBodyDef); b2PolygonShape groundBox; b2FixtureDef boxShapeDef; boxShapeDef....

how to display related image names in grid

hi i am new to iPhone development. what i am doing is displaying 20 images as grid and each image treat as button .by selecting that image it will be displayed on image view but what i need is along with that image,image name also displayed at bottom how can i done this pls help me i am lucky if u give a sample code also thank u ...

Weird problems on iPhone simulator but not device?

I'm having some problems with the iPhone simulator that don't seem to be occurring on the device. I have made a web service reference class with a bunch of static methods so different calls to a web service can be made from all over the application. The methods themselves contain a lock so only one request will be performed at a time. ...

Which object did send a "release" message to my property ?

Hi everyone ! There's something i don't seem to get about properties and memory management with iOS ! In my AppDelegate, i want a NSString * property : - i've declared it this way in the .h file : @property (nonatomic, copy) NSString *myString; - and synthetized it in the .m One of my method use the property like this : myString = ...

NSOperationQueue queue waitUntilAllOperationsAreFinished hangs

I have an iphone app where on the loading of a view controller, I want to call a web service , get and parse XML all on the background thread. Then update the ui after the thread is done, then fire off another thread to do a secondard operation in another background thread. Sort of like chaining threading calls: UI Thread -> Create BG...

Can not see iAd in program?

Hi all, My app has just released on Appstore ( http://itunes.apple.com/us/app/i-shock/id383457769?mt=8) . It runs with an iAd banner but I can not see it when I download from Appstore to my device (of course, network is working). The status in iAd Network is "Live: This app is receiving live ads.". iAd preferences was typed. My origin...

how to shrink image for iphone

i can pop up png with some animation but how to shrink same imgae when touch us finished??? right now iam doing this [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:1.5]; [self.pieView removeFromSuperview]; [UIView commitAnimations]; but it just remove the image directly ...

Expiring iPhone Provisioning Profiles

Hi, My client is asking me to distribute a demo app that should only be allowed to run for 5 days from the date of distribution. Is there a way for me to reduce the valid date of a provisioning profile in the iPhone provisioning portal to, say, 5 days, instead of the default 1 year for an ad-hoc distribution provisioning profile? Thank...

timer issue at getting previous view

hi i am new to iPhone development. what i am doing is displaying 20 images as grid and each image treat as button,by selecting that image it will be displayed on image view "here what i needed is i using timer to get back to grid but there is [NSCFArray ObjectAtIndex]: index(4) beyond bounds(4) and application terminates" how can i slove...

Core Location - Zoom in on current position

Hello, Is there anyway using Core Location to zoom in on the users current location, when my map loads its showing the entire world, I want the map to zoom in about 3km above the users current location. Regards, Stephen ...

iPhone ios4 - Replacing iPod dock icon whilst playing background audio stream

Hi, I've figured out how I can get audio playing in the background on ios4, however I've noticed that some apps also replace the iPod dock icon with their own app icon. (Last.fm & Spotify for example). They are also able to use the dock media controls to pause and resume their streams. Does anyone know how to do this? Thanks ...