cocoa-touch

UITableView inserting rows

I'm processing data fetched from a server in chunks. Every time a chunk is ready to be displayed (which happens every 0.1 seconds), I update the table view to reflect the changes. To do so, I'm using insertRowsAtIndexPaths:withRowAnimation: to insert each row into my UITableView as soon as the data becomes available. On the Simulator, t...

[UILabel setAnswerText:]: unrecognized selector sent to instance 0x4916830'

so i am getting an uncaught exception and im not sure why. this is the error i get: 2010-08-22 10:39:25.080 MayanGlyphs[10903:207] * -[UILabel setAnswerText:]: unrecognized selector sent to instance 0x4916830 2010-08-22 10:39:25.081 MayanGlyphs[10903:207] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ...

How can I increase the height of UITableViewCell dynamiclly

Hi, I have an UITableView which includes a list of UITableViewCells. And I set the heights of UITableViewCells in method (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath. However, I need to increase the height of UITableViewCell when it is selected. For example, the height of UITableViewCell ...

UIMenuController - customization

As os 3.2, we are allowed to change the editing menu. This is what the documentation states: "You may create your own menu items, each with its own title and action selector, and add them to the editing menu through this property. Custom items appear in the menu after any system menu items." I would like to remove those 'system items'...

Rich text editor library for iOS

Does somebody know a rich text editor (like NSTextView for Mac OS X) library for the iOS platform? ...

Crash involving UISearchDisplayController rotating?

My app seems to crash sometimes when I rotate the phone. ViewControllerA has a UISearchDisplayController. ViewControllerA pushes ViewControllerB onto the nav stack. Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x00000000, 0x00000000 Crashed Thread: 0 Thread 0 Crashed: 0 libSystem.B.dylib 0x000791d0 __kill + 8 ...

Is delegation the preferred way to do this?

I have an UIViewController subclass that allows the user to add a new model object, in this case a bank account. I named the view controller AddBankAccountViewController. The user can enter the account number, an account label and the bank of the account, but this is all done in separate view controllers. I'm using delegation to let Add...

Why do Cocoa-Touch class ivars have leading underscore character?

Is there some purpose for this convention? ...

Problem when using UIImageView's or UIButton's inside a UIScrollView

I'm using a UIScrollView to hold a varying number of images sized at 80x80, and when a user taps one I want it to launch into a modal view showing it fullscreen etc. The problem I'm having is detecting touches on the images inside the scrollview. I've tried two ways so far, but each one has an issue. I'm posting both ways but I only need...

Flipboard or iBooks style animation

Are there any examples out there to emulate page turning like iBooks or Flipboard? ...

Can viewDidAppear:animated method be called multiple times for a single presentModalViewController:animated ?

I have a view hierarchy like this: nav1 (UINavigationController, top level object in nib) view1 (UIViewController) nav2 (UINavigationController, top level object in nib) view2 (UIViewController) I called nav2's view[Will/Did][Appear/Disappear] methods in view1's each method. and when I'm calling presentModalViewControlle...

How to set tag to a button?

I am using [button.tag] = 50; But it is not working. I want to set tag to buttons. ...

How to add observer on a UISlider

Any idea how can i add my controller class as a observer for my View class' slider? I am trying to achieve this via Observer way: Inside my controller's viewDidLoad method I am calling [self addObserver:myView forKeyPath:@"myView.mySlider.value" options:NSKeyValueObservingOptionNew context:NULL]; and in the same controller file i am...

Iphone TextField.text

Hey, i have this code in my app where i put the text field text in my NSString property. iname = textField.text; after that at some point im doing this to make sure that the string is not empty [iname isEqualToString:@""] the problem is that if the textfield contain one word without space it works great if there is space it ...

How do blocks differ from normal methods and functions in Objective-C?

What is the advantage of using blocks over normal methods and functions in Objective-C? I've read the documentation, but I can't find specific uses of blocks instead of other language features. I'm sure that I've missed something, so could someone explain the advantages of blocks in a simpler way than the existing documentation? ...

Add window.navigator.standalone to UIWebView DOM

Hi, You know how a "webapp" can be installed via Mobile Safari by tapping the + button? And by launching this app via the homescreen your webapp knows that it was launched from the homescreen because window.navigator.standalone is set to 1... Well.. I made an iOS app with a UIWebView that loads a web app. And now I'd like to add the w...

Problems saving PDF files in iOS4

I want to have my iPhone application create a PDF file and store it in an appropriate place - probably the iBooks folder so it can be easily retrieved using iTunes, but that's a change for later once I have the saving part working. I've followed the PDF saving tutorial on the Apple site to the letter, including swapping out CGContextBegi...

UITableViewCell custom reorder control

Is there any way to change the image of the reorder control that is displayed when the UITableView is in edit mode? I have a UIImage that I’d like to display instead of the usual grey bars. Do I have to subclass UITableViewCell to accomplish this? ...

Is there a way to access a shared windows folder via cocoa touch (from iPhone/iPad)

Hi there, I want to access some pictures saved in a windows folder which is shared to a local network. Is there an easy way to access this folder using cocoa touch on the ipad (connected via wifi)? Thank you! ...

Passing variables (or similar) to newly loaded view

Hi All, I am loading new views for a small iphone app, and was wondering how to pass details from one to another? I am loading a tableview full of data from and xml file, then once clicked a new view is brought in via: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { SubInfoViewControll...