iphone

UIScrollView subviews do NOT maintain correct bounds dimensions under zooming.

I have a view hierarchy as a subview of a UIScrollView instance. The view hierarchy uses a simple container view as a wrapper around a horizontal row of subview tiles each of which is a UIView subclass that overrides drawRect. Nothing fancy. As a sanity check I echo the bounds, frame, and transform of each subview tile. To my astonishme...

Are there non-sampling time-profiling tools for iPhone apps?

I have tried Instruments and Shark to profile an iPhone app, but both use a data sampling approach, by regularly taking screenshots of thread stacks. I would prefer to have a full coverage profiling tool, which would record every single function call and the time spent in functions and their subroutines. This seems intuitively better th...

What is second param of NSLocalizedString()?

What is the *comment parameter in: NSString *NSLocalizedString(NSString *key, NSString *comment) If I do this NSLocalizedString(@"Hello_World_Key", @"Hello World") and have two versions of a Localizable.strings (English and es), does each need the entry: English: @"Hello_World_Key" = @"Hello World"; Spanish: @"Hello_World_Key" = @...

GPS Code not working in iPhone os 3.1

Hello, I am Using the following code to get the user current location in iPhone o 3.1 but the application get crash.Did the code change in 3.1? CLLocationManager *locmanager =[[CLLocationManager alloc] init]; [locmanager setDelegate:self]; [locmanager setDesiredAccuracy:kCLLocationAccuracyBest]; [locmanag...

Smoother UIView

Hi all, i'm looking for a way to make the menu system of my (very first) app scroll more smoothly. Currently I've got a panorma type view built in IB that's ~1900px wide by 480 tall image. On top of this are 8 buttons in various places along the view/image, when one of the buttons is selected i update 'xPoint' and call the below to updat...

How can I do variable height table cells on the iPhone properly?

Hey guys, My app needs to have variable height table cells (as in each table cell differs in height, not that each cell needs to be able to resize itself). I have a solution that currently works, but it's kludgy and slow. My Current Solution: Before the table cells are rendered, I calculate how high each cell needs to be by calling s...

How can I get the real time in iPhone, not the time set by user in Settings?

Hi, I need to ensure that my app gets the correct time, not the time set by the user in settings. So for instance, once the user starts the app, I'd want to get a timestamp. The user would see the elapsed time on a timer on screen updated every second. When the user exits the app, and after some time restarts the app , the timer wou...

iPhone Lock over web

i have asked this question before but i think i was not much clear that is the reason why i could not get exact answer to what i want. i want to lock and unlock my iphone over a web server (i enter the passcode and the web server will check if it is valid then i will be authenticated else message shown i entered wrong passcode) and not...

How can I detect whether the iphone has been rebooted since last time app started

Hi, I'd like to detect from within my app whether the iPhone has been rebooted since last time my app was started. I need to do this because my app uses the timer since last system reboot to clock a user's time and I want to detect reboot so I can invalidate the time. Is there anywhere I could extract the information from the system c...

Time to learn Objective-C/Cocoa for an Apple agnostic

This question is inevitably subjective, but I will ask anyway. I'm a PC. I've always been a PC. I have very little Apple expertise, although I'm completely happy in *nix. I've plenty of experience with development, and consider that I am able to pick up new languages and concepts faster than most of my colleagues (although ML/F# still h...

iphone Simulator crashing from Xcode run and go

Does anybody know what might be causing this problem? When I run the code, the program immediately crashes on the simulator before getting anywhere; however if I just go to the simulator and run the program, the changes were loaded and there doesn't seem to be any obvious problems. Or how could I try to pinpoint this problem? [Session ...

camera zoom in/zoom out functionality problem

i am creating an application in which i am loading the camera view on the viewdidload. i want to put a slider above the camera view so that when the user slides it the view through camera zooms in and out. i want to zoom in and zoom out before taking picture. i dont know exactlly how to do it. can someone give me idea. i read somewhere ...

NSMutableArray Vs UIView iphone

I have an NSMutableArray in my MainViewController classes.. I added 10 Objects to NSMutableArray.When i Click subview button in my MainViewController classes, I push SubviewController (UIViewController)classes.... In subviewcontroller classes i want to use MainViewController Values of NSMutableArray. And also i Want to add or remove obje...

iPhone Push Notification Unable to Connect to the SSL Server

I followed the instructions at: How To Build An Apple Push Notification Provider Server When I run the php script on my MacOSX or on Windows using Parallel desktop, the script works. But as soon as I run it on my hosting I get the message: Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gatew...

Is it possible to get the atomic clock timestamp from the iphone GPS?

Hi, I'm looking for a reliable way to get the time. It can't be tampered with and it needs to work offline. So no internet time , no user time setup in settings and no BSD uptime time since last reboot. I was wondering since GPS works using atomic clock, whether I could access that information. Thank you ...

IPhone program crash and stack report shown by compiler is totally useless!

Most of the times when Iphone program crash, compiler show stack with full of no's, but these no's don't make any sense to me. Very rarely it point out where the problem might be and mostly there are these useless no's. How you can make sure that when your program crashes while development/testing, it shows at what place this cause this ...

Do commercial (paid) iPhone apps have to pay a license to Google for Maps?

I know that happens with commercial websites so I was wondering if commercial iPhone apps that use the MapKit (especially those that generate a lot of traffic) need to get any sort of license from Google Maps as well. My best guess would be no, but just asking in case someone knows better. Also, I would guess Google gets license fees fr...

imagepicker+navigationController causing problems in iphone?

how do i do this..i have appliation delegate...in which i added uinavigation controller through code... here is my code... - (void)applicationDidFinishLaunching:(UIApplication *)application { HomeScreenController *homeScreenobj=[[HomeScreenController alloc] initWithNibName:@"HomeScreen" bundle:[NSBundle mainBundle]]; navController...

Push notifications (iPhone) give "111 Connection refused"

When I try to send Push Notifications I get this error: "Connection refused", but I don't know why... I've uploaded my apns-dev.pem in the same directory as well in the root-directory but that won't work either. <?php $payload['aps'] = array('alert' => 'This is the alert text', 'badge' => 1, 'sound' => 'default'); $payload = json_encod...

How big is an Objective-C iPhone app vs. a MonoTouch app?

I am considering using MonoTouch for some iPhone development, but payload size is an important factor. For a user who has never installed Mono on their iPhone before, what would the size of an Objective-C "Hello World" app be compared to a MonoTouch "Hello World" app? More specifically, what is the approx. number of bytes that need to ...