Tag: iphone

Set ringtone in iPhone SDK

How can an application set a ringtone on iPhone?

How to get audio volume level, and volume changed notifications on iOS?

I’m writing a very simple application that plays a sound when pressing a button. Since that button does not make a lot of sense when the device is set to silence I want to disable it when the device’s audio volume is zero. (And subsequently reenable it when the volume is cranked up again.) I […]

Static table view outside UITableViewController

after the new xCode update, my app doesn’t validate and shows this error: static table views are only valid when embedded in UITableViewController instances Any chances to solve easily?

iPhone – Get Position of UIView within entire UIWindow

The position of a UIView can obviously be determined by view.center or view.frame etc. but this only returns the position of the UIView in relation to it’s immediate superview. I need to determine the position of the UIView in the entire 320×480 co-ordinate system. For example, if the UIView is in a UITableViewCell it’s position […]

Best practices for iOS applications security

When thinking about iPhone/iPad applications security, I can notice that there is: Widely available hacking tools allow filesystem access Network interception, men in the middle attack ==> data theft threat and also: Availability of hacking tools that allow to freely share a paid app with friends/community (seen in Cydia) Availability of hacking tools that allow […]

Adding a UILabel to a UIToolbar

I’m trying to add a label to my toolbar. Button works great, however when I add the label object, it crashes. Any ideas? UIBarButtonItem *setDateRangeButton = [[UIBarButtonItem alloc] initWithTitle:@”Set date range” style:UIBarButtonItemStyleBordered target:self action:@selector(setDateRangeClicked:)]; UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 20, 20)]; label.text = @”test”; [toolbar setItems:[NSArray arrayWithObjects:setDateRangeButton,label, nil]]; // Add the toolbar as […]

How to use beginBackgroundTaskWithExpirationHandler for already running task in iOS

In my app, I am uploading images to server from iPhone. While sync if user press home button, App will close. I want app must be running in background till sync finish. My question is: How can I add currently running task with “beginBackgroundTaskWithExpirationHandler“? Please share your ideas.

how to send Asynchronous URL Request?

I would like to know how do I get a return value 1 or 0 only…. back from an URL request asynchronously. currently I do it in this way: NSString *UTCString = [NSString stringWithFormat:@”http://web.blah.net/question/CheckQuestions?utc=%0.f”,[lastUTCDate timeIntervalSince1970]]; NSLog(@”UTC String %@”,UTCString); NSURL *updateDataURL = [NSURL URLWithString:UTCString]; NSString *checkValue = [NSString stringWithContentsOfURL:updateDataURL encoding:NSASCIIStringEncoding error:Nil]; NSLog(@”check Value %@”,checkValue); this works, […]

Xcode stuck at “Your application is being uploaded”

I am facing an issue while submitting my app from Xcode to the App Store. I have done everything regarding my project, and its running fine on my iPhone and iPad. But when I submit my project I am facing a huge problem. First after archive I have done the validate. Now my archive file […]

Instead of push segue how to replace view controller (or remove from navigation stack)?

I have a small iPhone app, which uses a navigation controller to display 3 views (here fullscreen): First it displays a list of social networks (Facebook, Google+, etc.): Then it displays an OAuth dialog asking for credentials: And (after that, in same UIWebView) for permissions: Finally it displays the last view controller with user details […]