Tag: ipad

Objective-C: Numbers only text field?

Possible Duplicate: Iphone UITextField only integer I want to place a text field that only accepts numbers (0-9, doesn’t even need decimals), but even using the “Number Pad” entry option I still get a keyboard with various symbols on it. Is there a better control for this, is there a better control for what I’m […]

Detecting a change to text in UITextfield

I would like to be able to detect if some text is changed in a UITextField so that I can then enable a UIButton to save the changes.

Change UIImageView mode iPhone/iPad

If I have an UIImageView with the mode set to center for example how can I change it to something else such as aspect fit with code?

positioning and customizing delete button for custom UITableViewCell

I have a subclassed UITableViewCell and now I also need a custom delete button for this cell. What should I do in this case? Do I add this button in the layoutSubView? I already have my delete button on the nib file of the cell. What I have now in the custom cell is to […]

Replace multiple groups of characters in an NSString

I want to replace several different groups of characters in one NSString. Currently I am doing it with several repeating methods, however I am hoping there is a way of doing this in one method: NSString *result = [html stringByReplacingOccurrencesOfString:@”<B&” withString:@” “]; NSString *result2 = [result stringByReplacingOccurrencesOfString:@”</B>” withString:@” “]; NSString *result3 = [result2 stringByReplacingOccurrencesOfString:@”gt;” withString:@” […]

iPhone/iPad circular intensity gauge control (image included)

I found this interesting interface(starts at 33 seconds http://vimeo.com/22946428 ), and would like to design something similar for my own apps. I’m particularly interested in the circular intensity gauge/knob control as on the attached image. It has a very futuristic feel to it and should be fairly simple to implement using touchesMoved: gesture recognizer callback. […]

Use of FourSquare API to find nearby places in iOS SDK

How to use Foursquare API to find nearby places in iOS Applications. As I am new in this environment.. So please help me to find any sample tutorial available on the API. I had gone through this link, And I got the response “error type” : deprecated so please provide another link for this same […]

How to stop UIPanGestureRecognizer when object moved to certain frame

I have an object of image type which I am moving using UIPanGestureRecognizer, and I need to stop recognizing the UIPanGestureRecognizer when the object reaches a certain frame. UIPanGestureRecognizer *panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(move:)]; [panRecognizer setMinimumNumberOfTouches:1]; [panRecognizer setMaximumNumberOfTouches:1]; [panRecognizer setDelegate:self]; [templatePhotoPlaceholderView addGestureRecognizer:panRecognizer]; -(void)move:(UIPanGestureRecognizer *)gestureRecognizer { CGPoint translatedPoint = [gestureRecognizer translationInView:templatePhotoPlaceholderView]; if([gestureRecognizer state] == UIGestureRecognizerStateBegan) […]

Dismissing a UIDocumentInteractionController in some cases will remove the presenting view controller's views in IOS 7 iPad

When the UIDocumentInteractionController is dismissed, the presenting view controller’s views are removed, including elements from the UINavigationController. The UIDocumentInteractionController dismisses and the presenting view controller’s views are removed, leaving a plain white/gray box where the presenting view controller formerly existed. The app no longer responds to any touch events after this point. This Occurs on […]

UICollectionView registerCell – Blank Cells

I’ve just starting playing around with UICollectionView for the first time. Seems to work nicely, but having an issue and a question about it. I have my UICollectionView setup as below and with a custom cell: – (NSInteger)collectionView:(UICollectionView *)view numberOfItemsInSection:(NSInteger)section { return 10; } – (NSInteger)numberOfSectionsInCollectionView: (UICollectionView *)collectionView { return 1; } – (UICollectionViewCell *)collectionView:(UICollectionView […]