cocoa-touch

very strange thread error message

I an trying to put a method in a separate thread in the background. It nearly works except that occasionally I get a lot of error messages with the message METHODCLOSURE: OH NO SEPERATE THREAD with the bad spelling and all. Does anyone know what this means? The thread runs, interestingly More specifically: I invoke a background pr...

Adding back button to navigation bar

I've added a navigation bar to a UIViewController. It is displayed from another UIViewController only. I'd like to have a left side back button that is shaped similar to an arrow, just like the normal navigation bar back button. It seems I can only add a bar button through IB. I'm guessing the back button needs to be added programmat...

No scrolling occurs when UITableView scrollToRowAtIndexPath is invoked

My view contains a simple TableView with 6 rows and a button that invokes doScroll when clicked. My objective for doScroll() is simply scroll to the 5th cell such that it's at top of the table view. - (void)doScroll: (id)sender { NSIndexPath *index = [NSIndexPath indexPathForRow:4 inSection: 1]; [m_tableView scrollToRowAtIndexPa...

Detect if NSString contains a URL and generate a "link" to open inside the app a Safari View

I have am reading a twitter feed in my iPhone application and can do it correctly, but I'd like to evolve it in a way to detect if the whole NSString contains any URL or URLs and create a "link" that will open a UIWebView within the same application. Can you guide me on how to perform this task? -(void) setTextTwitter:(NSString *)text ...

How is the iPod app on the iPhone designed?

Is it just a tab-bar controller that loads some UITableViews that has navigation items set? Or is it a tab-bar controller that is loading a navigation controller? ...

How to return back to My Application after completing the call from iphone

Hi all I am showing contacts list in my iphone application. When user taps a contact number then call starts. But when call is completed then iPhone exits from My Application and switches to the Apple iPhone contacts application. Please suggest me any idea on how to return back to My Application after completing the call.. Thanks Dee...

UiPickerView change font color according data

I'm using a pickerView with multiple components related to several fields in a Database (CoreData). Is it possible to change the fontcolor for a specific component according the presence of data in the DB ? For example the field in the DB is null the component font color should be RED otherwise black. Any help will be appreciated ! Dar...

Using Badge Subview of TabBarItem Elsewhere

Since Apple doesn't seem to provide a public means of creating notification badges wherever you like, I was wondering if it was; A) Possible to reference the subview of a tabbar/tabbaritem that is the badge indicator? B) If so, is it kosher to use/duplicate this view for use within my own view? ...

How to handle an array of pointers in Objective-C

I figured out the answer to this question, but I couldn't find the solution on here, so posting it for posterity. So, in Objective-C, how do you create an object out of a pointer in order to store it in objective-c collections (NSArray, NSDictionary, NSSet, etc) without reverting to regular C? ...

Tab bar within Navigation bar

I have a navigation based app, in one of the screen I now want to add a tab bar. Can any one please share code snippet on how I can do that. Thanks ...

iphone/ipad adding adding and removing a subview doesnt work

Im have a slight amount of trouble adding a new view to my scene, I have the code like this: - (void) showMyDayView { NSLog(@"My Day View was touched"); MyDayViewController *temp = [[MyDayViewController alloc] initWithNibName: @"MyDayView" bundle:nil]; self.myDayViewController = temp; NSLog(@"superview: %@", [[self mainNavView] superv...

How to calculate size of HTML text to be drawn.

Hi, How to create pages and display in UIwebView from HTML file? How to calculate and draw the amount of text from HTLM file. pls suggest? ...

How do I create a UISplitView manually?

I have an app that is going to navigate to a UISplitView (inside another view altogether) like so: - (void) switchToMyDayView { NSLog(@"Show My Day Screen"); if (self.myDayController.view.superview == nil) { if (self.myDayController == nil) { MyDayController *myController = [[MyDayController alloc] initWithN...

How to retrive message history from iphone programmatically ?

I needs to show messages which are available in history. I mean messages that are present in iphone. I try from google but no any appropriate help. Is there no any way to retrive it from iphone ? or is there any alternative way ? Please mention that i just needs the history of messages. ...

How can we set time delay in animation of images to make them appear smooth ?

Hi, I have 10 CCSprite images. They are continues images. I am using, CCSprite *playerH = [CCSprite spriteWithFile:@"Player_01.png" ]; playerH.position = ccp(playerH.contentSize.width/2, windowSize.height/2); [self addChild:playerH z:1]; CCAnimation* animation = [CCAnimation animationWithName:@"dance" delay:0.20f]; for( int i = ...

Remove a toolbar when pushing a new view

In the iPhone maps app there's a toolbar at the bottom of the map view (it contains the Search/Directions segment control and others). When moving from the map view by clicking on a callout, the toolbar slides out with the map view, leaving the next view (a table controller) with no toolbar. I've tried to do the same thing with [self.n...

Speed up UI loading from NIBs on the iPhone

First up, i realize this application has some design issues and while rewriting a huge chunk of it would probably solve my issues, I'm looking for a way to make things faster right now. Basically I've got viewController = [[MyViewController alloc] initWithNibName:nil bundle:nil]; viewController.view; where MyViewController.xib is a ...

Outline view from UITableView

Hi guys, I need to implement a 1 level outline view out of UITableView. The cells which have children in them will have a '+' symbol and if user taps on it, the cells below it should slide down and the children cells of current selected row should appear. The sliding of cells should be visible and if the user taps '-' button of the alre...

How to know tabbar tab was pressed?

I have a tabbar based app. In the app delegate, I've implemented: - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController{ if([viewController isKindOfClass:[TabBNavigationController class]]){ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [...

How to Implement Rich Document Editor for iPhone

I'm just getting started on a new iPhone/iPad development project, and I need to display a document with rich styled text (potentially with embedded images). The user will touch the document, dragging to highlight individual words or multiline text spans. When the text is highlighted, a context menu will appear, letting them change the c...