Tag: iphone

UITabBarController application and pushViewController fail

I have created a TabBarController app with three ViewControllers inside UINavigationControllers, A, B and C. I have created everything programmatically. Now I want to push some ViewControllers inside one of those TabBar items. For Example if I am in ViewController B and I press one button I want to make a pushViewController to ViewController: D […]

Checking if a nsstring matches another string

Suppose I have a string “167282”. How can I check if the string contains “128”? Is there any provision to know the percentage of the 2nd string that matches the first string? (If all the characters of the 2nd string are present in the first string or not.) Please help and thanx in advance.

Overriding internal UIViewController methods because an internal method is giving me bugs

What are the consequences of overriding internal UIViewController methods? [UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:] is giving me some problems. It resizes my frame to values I do not desire sometimes. I do not even know where it picks off the new frame’s values (it is close to the size of the superview to where I am adding it, […]

iPhone: Does it ever make sense for an object to retain its delegate?

According to the rules of memory management in a non garbage collected world, one is not supposed to retain a the calling object in a delegate. Scenario goes like this: I have a class that inherits from UITableViewController and contains a search bar. I run expensive search operations in a secondary thread. This is all […]

“html agility pack” like solutions for C/Objective-c/iPhone

I need a powerful HTML parser and manipulator for Objective-C/C, like HTML Agility Pack. Can anyone tell me some optimal solution? One solution is libxml2, but it seams is not the best. Thanks in advance!

UIImagePickerController ios 5 issue when select the image uising UIPopoverController in ipad

i have the problem with the select the image from UIImagePickerController in ipad in ios 5. same code was run perfectly in ios 4 . so what is the problem ? can any one help me how to use UIImagePickerController in ios 5 ? Is there any difference between ios 4 and ios 5 for […]

Can you swizzle application:didReceiveRemoteNotification:

I’m currently working on a product that needs to swizzle the AppDelegate’s application:didReceiveRemoteNotification: (I don’t want to call my new method in the appDelegate itself). The thing is: the swizzling simply doesn’t work. I’ve already swizzled methods several times before with success, and this time, the replacing implementation is simply not called. I was wondering […]

Sms sending without MFMessgeViewController on ios 6

Anybody no to send sms programmatically in iOS6.Earlier I was using core telephony method to send SMS.It’s working fine up to iOS5 but on iOS6 my code is not working. I using following code: BOOL success = [[CTMessageCenter sharedMessageCenter] sendSMSWithText:@”Message” serviceCenter:nil toAddress:@”8800781656″]; What am I doing wrong? Thanks in advance

How do I know if text exceeds the bounds of a text view?

I would like to know when text exceeds the bounds of a UITextView and requires the user to scroll. Knowing how many lines a certain font will occupy is useless – how do I know how many lines a certain amount of text will take up? In the image above, I would add a fade […]

Creating a new NSString instance has retain count of 3

I am trying to copy a string that is passed into a method like so: -(void) parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict { NSLog( @”elementName, %@: %i”, elementName, [elementName retainCount] ); // rc = 2 if ( currenttag ) [currenttag release]; NSLog( @”currenttag: %i”, [currenttag retainCount] ); // rc = 0 […]