19
голосов
3ответов
27560 просмотров

MKMapView: Get clicked event on annotation pin

I am using an MKMapView containing a couple of MKAnnotation pins. Above the map I am showing a UITableView with detailed information of the MKAnnotation pins. My problem: When I select a pin, I would like to select the corresponding table cell. For this I would like to catch an event/delegate if...

6
голосов
5ответов
1571 просмотров

Can I identify a jailbroken phone from the crash logs?

A number of the hardest to track-down problems I've come across with my iPhone application have only exposed themselves on jailbroken handsets. Is there a way to detect these handsets looking only at the crash logs? This is kind of like this question but after the event rather than during...

4
голосов
3ответов
1840 просмотров

How to identify & use OSType in Cocoa

In Cocoa/Mac OSX 10.6 OSType IOSurfaceGetPixelFormat(IOSurfaceRef buffer) returns a type OSType where can I find some documentation/reference on the supported OSType with regard to the context of this function. What sort OSType should I expect with IOSurfaceGetPixelFormat? do you have any i...

1
голосов
2ответов
519 просмотров

iPhone: Sharing data between native and webapp

I would need to share data (not necessarily a large amount) between a native iPhone app, and a safari/webkit javascript app... Do you know how this could be done ? I considered sqlite.. But it seems an application can only read/write inside its own bundle (so, not in the webkit databases directo...

0
голосов
1ответов
802 просмотров

UIDatePicker and UITextView

I want to show a text in UITextView depend on the date, some thing like "in This Day App", I have this code in action -(void)changingText:(id)sender { NSDateFormatter *df = [[NSDateFormatter alloc] init]; df.dateStyle = NSDateFormatterMediumStyle; label.text = [NSString stringWith...

130
голосов
4ответов
79509 просмотров

How big should a UIBarButtonItem image be?

I'm looking to create my own custom Sort By Date and Sort By Number buttons that I plan on placing in the navigation bar as the right button. How big should my image be to appropriately fill the space -- the UIBarItem documentation page doesn't list anything about the size the image should be.

2
голосов
4ответов
635 просмотров

What are the common practices to protect data on iPhone

The client is concerned about safety of the data application uses and stores locally on device (e.g. they want to prevent reading our data files even on jailbroken iPhones). So I wonder - what are the possible ways to ensure data safety on iPhone? Edit: I'm thinking about 2 ways of storing data...

17
голосов
9ответов
29607 просмотров

Changing UITableView section header without tableView:titleForHeaderInSection

I'm trying to change the header title for a section in a UITableView when a cell from that section is selected. tableView:titleForHeaderInSection is triggered by the application, so that doesn't help. I can call reloadData, but the performance suffers because the app has to reload all the visible...

4
голосов
9ответов
12767 просмотров

View Controller being sent a message even though it has been deallocated

I am not sure if something has changed in the iPhone SDK 3.0 but I am getting the strangest error. I have a view controller hierarchy where I switch between view controllers depending upon interface orientation. From what I can tell, the error is caused whenever I rotate the interface a view cont...

4
голосов
2ответов
3281 просмотров

Rotating UIView - willRotateToInterfaceOrientation not being called

I'm trying to autorotate a view and I have the same problem explained here: willRotateToInterfaceOrientation not being called. Even though I implemented shouldAutorotateToInterfaceOrientation and returned YES, in every UIViewController subclass I implemented; willRotateToInterfaceOrientation is ...

14
голосов
1ответов
1765 просмотров

How does Grand Central Dispatch really use the operating system?

I have a solid idea how GCD works, but I want to know more about the touted "operating system management" internals. It seems almost every technical explanation of how Grand Central Dispatch works with the "Operating System" is totally different. I'll paraphrase some of my findings. "It's a...

164
голосов
4ответов
101071 просмотров

UIViewController viewDidLoad vs. viewWillAppear: What is the proper division of labor?

I have always been a bit unclear on the type of tasks that should be assigned to viewDidLoad vs. viewWillAppear: in a UIViewController subclass. e.g. I am doing an app where I have a UIViewController subclass hitting a server, getting data, feeding it to a view and then displaying that view. Wh...

0
голосов
1ответов
249 просмотров

How to build a UI of two textfields in a 'panel' on iOS?

I want to build a UI with textfields. I need two textfields appear in a "panel" and I have control of that "panel" to have it display or not display. How can I make that?

5
голосов
5ответов
4517 просмотров

How do you use groups in XCode?

I started using groups in Xcode the same way I use packages in Java or namespaces in C++, even though groups have no effect on the language. Then I discovered Smart Groups and realised that it's sort of pointless to have my code neatly organised in "folders". Do you use groups? If so, how and w...

1
голосов
1ответов
566 просмотров

how to get cell value in iphone?

In my iphone application I have 4 cell in uiTable, and each cell having Integers values(10, 12, 13, 14).How to retrieve the integer value while I click on each cell? And how to put if condition to check whether the value of the cell is same or not? I.e. if(cell value==condition){ }

1
голосов
1ответов
1772 просмотров

Control iPhone Services using Low--Level API or PrivateFrameworks in Xcode

I am trying to make put together a simple application to control the phone services such as WiFi, Bluetooth, 3G, etc. using Private Frameworks or low-level API's. I am able to build the device and SSH it to my device without a dev account, and I have the SDK headers, but I am looking or some hel...

5
голосов
2ответов
13117 просмотров

How do I create a CGImage with RGB data?

Can anyone show me a clear example of how to use CGImageRef CGImageCreate ( size_t width, size_t height, size_t bitsPerComponent, size_t bitsPerPixel, size_t bytesPerRow, CGColorSpaceRef colorspace, CGBitmapInfo bitmapInfo, CGDataProviderRef provider, const CGFloat de...

-3
голосов
4ответов
2611 просмотров

Mac Mini for iPhone development

I'm about to buy a Mac Mini so I can develop an iPhone application. The details are: 1.42ghz 1gb ram 75gb OS 10.5.08 Is this good enough for developing an iPhone application?

124
голосов
17ответов
91185 просмотров

iPhone Simulator location

Where on my machine is the iPhone simulator installed? I'm been trying to find where a test application I run in the simulator is stored.

88
голосов
9ответов
61627 просмотров

How to customize the callout bubble for MKAnnotationView?

I'm currently working with the mapkit and am stuck. I have a custom annotation view I am using, and I want to use the image property to display the point on the map with my own icon. I have this working fine. But what I would also like to do is to override the default callout view (the bubble th...

25
голосов
3ответов
25727 просмотров

Display an image or UIImage with a plain CALayer

I've often read that using a CALayer rather than a UIImageView is an performance boost when it comes to heavy image usage. That makes sense, because UIImageView causes 3 copies of the image in memory, which is needed for Core Animation. But in my case I don't use Core Animation. How can I assign...

4
голосов
1ответов
4867 просмотров

Launch Google maps app from iPhone application.

I'm trying to launch google maps from my iPhone application. The launching part works fine but since the iPhone 3.1 update (i think it was around this time) I get a zoomed out map of the US and Canada rather than zoomed in on my current location. Everything worked fine originally but sometime...

176
голосов
2ответов
72428 просмотров

Best practice? - Array/Dictionary as a Core Data Entity Attribute

I am new to Core Data. I have noticed that collection types are not available as attribute types and would like to know what the most efficient way is of storing array/dictionary type data as an attribute (e.g. the elements that make up an address like street, city, etc. does not require a separa...

67
голосов
12ответов
21891 просмотров

Cocoa-Touch: How do I see if two NSDates are in the same day?

I need to know if two NSDate instances are both from the same day. Is there an easier/better way to do it than getting the NSDateComponents and comparing day/month/year?

31
голосов
9ответов
22780 просмотров

Turn off Zooming in UIScrollView

Does anyone know a way to temporarily turn off zooming when using a UIScrollView? I see that you can disable scrolling using the following: self.scrollView.scrollEnabled = false; but I'm not seeing a similar command for zooming. Any thoughts?

546
голосов
47ответов
284938 просмотров

How can I create a UIColor from a hex string?

How can I create a UIColor from a hexadecimal string format, such as #00FF00?

0
голосов
1ответов
196 просмотров

Would Apple reject an app because of using cookies?

Would Apple reject a native app because it stores cookies send back and forth to the server?

0
голосов
1ответов
56 просмотров

Works in OS 2.2.1 but not in OS 3.0: Error: type of accessor?

Does Anyone have any idea why this code produces this errors in OS 3.0 and not OS 2.2.1? NSUInteger aCount = [serverBrowser.servers count]; error: type of accessor does not match the type of property 'servers' ServerBrowser.h is define below and serverBrowser is synthesized in .m above. #i...

17
голосов
7ответов
27598 просмотров

How to trap the back button event

I have a UITableViewController that launches a UIViewController and I would like to trap whenever the back button is pressed in the child controller, which is the class that derives from 'UIViewController'. I can change the Back Button title but setting the target & action values when setting...

28
голосов
4ответов
45430 просмотров

How to handle push notifications if the application is already running?

How do we handle push notifications if the application is already running ? I want to show an alert if the application is running (instead of a push notification alert). Only if the application is not running, then show a push notification alert. Also, if I send a payload to APNs, how can I crea...