iphone

iPhone: change height of UITableViewCell coming from a NIB

I have a UITableView of custom UITableViewCells which looks like this: [ CELL 0 [ description ] [ dynamic content type 1 ] [ dynamic content type 2 ] [ dynamic content type 3 ] ] [ CELL 1 [ description ] [ dynamic content type 1 ] [ dynamic content type 3 ] ] [ CELL 2 [ description ] [ dynamic con...

NSXMLParser, Issue with ASCII Character Set

Hi all <Feeds> <channel> <ctitle>YouTube</ctitle> <cdescription>YouTube - Recently added videos</cdescription> <items> <recentlyAdded> <item> <serverItemId>1</serverItemId> <title>Fan Video CARS</title> <author>mikar1</author> <guid isPermaLink='false'></guid> <link>http://www....

NSFetchedResultsController sections localized sorted

How could I use the NSFetchedResultsController with translated sort key and sectionKeyPath? Problem: I have ID in the property "type" in the database like typeA, typeB, typeC,... and not the value directly because it should be localized. In English typeA=Bird, typeB=Cat, typeC=Dog in German it would be Vogel, Katze, Hund. With a NSFetc...

Where to add an observer to the NotificationCenter in a UITableViewController

I want to send a notification from a UITableViewController-A to UITableViewController-B. I was adding the observer in the initwithCoder of the UITableViewController that is supposed to catch the notifications. The classes are correlated as folows RootViewController ===NavigationController-A =====UITableViewController-A ===Navigati...

Where exactly must I create the fr.lproj localization file, for example?

Do you put it in "Other Resources"? Or "Resources-iPhone"? Or even in the Classes group? Or in the root of the project? What's the recommended place? ...

While saving a PNG image using NSData writetofile saves corrupted data on the iphone disk

I have a number of images (PNG,GIF and JPG) in my Application Resource Bundle. I want some images to be saved in my Documents Directory so i use : imgPath=[documentsDirectoryPath stringByAppendingPathComponent:@"myImage.png"]; if (![fileMgr fileExistsAtPath:imgPath]) { [[fileMgr contentsAtPath:[[NSBundle mainBundle] pathFo...

How do I access a Core Data entity's attributes in code?

I've got the following bit of code in one of my methods: ... NSNumber *selectedRecordID = [NSNumber numberWithInt:ABRecordGetRecordID(person)]; for (NSManagedObject *managedObject in fetchedResultsController.fetchedObjects) { if (selectedRecordID == managedObject.contactID) { // this line generates a compiler error // do some s...

UIWebview does not show up into UINavigationController

Hi I have a tabBar application. In the first tab, I have a navigation bar. In this navigation bar I have a table view. When the user clicks a cell of the table, it goes to another table view, and when the user clicks a cell in that table, it goes to a webview to open a web page. Basically, it goes fine until opening the webview. In the...

Cocoa - does CGDataProviderCopyData() actually copy the bytes? Or just the pointer?

I'm running that method in quick succession as fast as I can, and the faster the better, so obviously if CGDataProviderCopyData() is actually copying the data byte-for-byte, then I think there must be a faster way to directly access that data...it's just bytes in memory. Anyone know for sure if CGDataProviderCopyData() actually copies t...

What are the wise and allowed ways to add advertisement to iPhone App?

I will be publishing an App in a few days. Initially I don't want to add advertisements, but can change my mind anytime, so I've thought this. Add a WebView to application and set its image to a dynamic web content. If no ads; I will display a simple logo, but when ads are available, replace the content with them. So there will be no mod...

Capture Backspace , is this a OK solution?

Hello, I having a hard time to capture the backspace button in a UITextView. I am trying to capture it in the method - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text I thought it was ok to do like this. if([text isEqualToString:@"\b") { // code ... } ...

How to go about this big localization problem?

Imagine you have an iPhone app which is localized using NSLocalizedString all over the place. I did exactly this. Now I realized some of my comments for NSLocalizedString are wrong, and replaced them with something better. Also I added some strings and removed some others. Now I have 50 Localizable.strings files. What horrible options ...

iPhone - setNeedsDisplay doesn't call drawRect

Hi everyone, I have seen many posts about this problem but didn't get an answer. I have a controller which view is added to the main window. The controller's view has a subview which has a drawRect. The problem is that this function is never called even if I call [self setNeedsDisplay]. Thanks ...

how to get data from the UIAddressbook in iphone?

I want to import data frome the iphone address book to my applciation. Can you give me any reference sample code? ...

Default Sorting with Core Data

This could well be a real stupid question, but I can't seem to sort my Core Data fetched results in the order they were saved to the persistent store. Effectively, I don't want to sort them at all, but omitting the sort descriptors from the fetch request gets me into all kinds of trouble. Is what I'm trying to achieve here possible, or...

How to delete a cell in UITableView by using custom button in cell ?

I have UITableView. I customized the cell height (80.0f). I have 4 labels(UILabel) and 1 image(UIImage) and 3 buttons (UIButton). one of the button is delete button. By touching the cell or button(play button) on the image a video is loaded and played. I need to delete the cell by touching delete button. I wrote a selector for d...

jqTouch/JavaScript alerts - how to remove the title?

Looking to have some alerts/prompts pop up in my iPhone web app but I see the Title is at the top of the alert (I understand this is the normal behavior). My question is can I remove this? or use an alternative solution. Looking for something that looks like the push notification alert but in JavaScript. ...

How do I include the static library for Core Plot?

According to the Core Plot Wiki: Core Plot is built as a static library for iPhone, so you'll need to drag the libCorePlot-CocoaTouch.a static library from under the CorePlot-CocoaTouch.xcodeproj group to your target's Link Binary With Libraries folder. I do not see the mentioned library, where might it be? ...

obj-c : iphone dateformatter in 12-hours clock format.

hi, i want in my application to use the 12 hour clock format so the user can write 15:00 for 3:00 pm so i don't need to create a button am and pm. Thanks ...

Custome UITextview

Hello friends. I want to create custom UITextview with Line because i want to create a latter effect. is this possible to set line in particular space in UITextView ? Thanks you, Milan ...