TTWebController with drag refresh - objective-c

i'm looking three20 and I wish make this thing: use a TTWebController but implement the feature that is shown on the 'Table with drag refresh', drag to the bottom and the webpage will be loaded, showing on the top the arrow like twitter, like many apps... it's possible to do this?
how can I do this?
thanks in advance

Pull to refresh is implemented as a Table View Delegate and the TTWebController is a simple controller with a uiwebview in it.
One way around it would be to create a new TableViewController with the TTTableViewDragRefreshDelegate as the table delegate. You would then create another cell with the web view.
A problem with that solution is that the web view has it's own scroll view and that will take precedence over the tableview scrollview. so you would actually need to make sure you drag the table and not the webview.
All in all I suggest you not do it :) and use a button for the refresh.

Related

How to Create UITabController on a Button Click

I am working on app. It has normal 3 views. On third view, I have a table view. If I select any row, I want a view which contains UITabController. I have created a simple UITabController app, but unable to do this. How to do this ?
thanks in advance
IMHO, your question is perhaps ill conceived.
A tab bar controller controls view controllers which in turn control views. Your suggestion that a view contains a controller of controller simply does not make sense.
Maybe what you really want on selecting a row in your table view is to present a new view controller and then make the (existing) tab bar visible.
You usually want a UITabBar to be THE navigation for your application and not show it later on one view.
But if you want to do so you should show, as Mundi said, a new UITabBarViewController when you select your UITableViewCell.
I don't know your exact usecase, but if you work with a UITableView I would use a UINavigationController to push a new View when you tap one UITableViewCell. Then it may be better (If you have 2-3 Elements) to use a UISegmentedControl in the UINavigationBar. This would look like this.

Storyboarding with dynamically generated buttons

I am wondering if it is possible to dynamically create segues between views. I am generating all my UI buttons programmatically. Is this possible? I haven't been able to find anything on this topic.
Thank you
I am not sure what you mean by "create segues". But if you mean creating buttons which perform segue on being pushed, you can use performSegueWithIdentifier:sender: on UIViewController in respective action. Docs here.
If you want to transition to view that there is no segue to, I suggest directly calling presentViewController:animated:completion:.

The same UI as in Contacts (buttons and a table view in the same place)

Please go to your Contacts app, and choose one of your contacts.
You'll see that the view has labels, buttons and a table view all in the same view. And you can also scroll it around.
I want to set up the same kind of UI.
How would I organize things in interface builder to accomplish this? I would imagine I’d have to create a regular UIViewController subclass, and create a XIB file with a scroll view, which in turn contains the buttons and table view? I tried, but it doesn't give me the desired effect. For example, the view refuses to “bounce” upon scrolling.
You have to create a UITableViewController and create the Table you want.
The buttons are costum Table cells in the UITableView with round rect buttons in it. They have selectors to call methods.
Edit: Wrong answer, poster wants something different, but I'll let the answer stand because people might land here while searching.
What you probably want is the ABPeoplePickerNavigationController. Apple has sample code that demonstrates how to use it.
It might be using tableview or might be just a UIVIew with ScrollView and labels+buttons. You approach is right and it'll bounce if your view size is larger than your screen size

How to present a UITableView and its Detail View in the same View

I'd like to show in an iPad application an UITableView and the result of clicking on Cell in the same View. I'm able to show one of them, but not both at the same time. Here's the design idea:
So when I click a cell, the chart will change.
Thanks in advance, everything is welcome!
Cheers
A UITableView can be used as a subview attached to any UIViewController, so this shouldn't be a problem. You will need to make your view controller handle the data source and delegate methods, as well as the detail view and any other elements.
What you want can be accomplish by using a UISplitViewController.
You can also take a look at the "Master Detail Application" Template provided by apple.

Best way to accomplish something like subcells with an UITableView on iPad?

I have a table view where I show chapter title's of a book.
When I touch a cell, I check if there is more than one file to open because some of this chapters have different versions.
So I need something like a subcell which moves in, or a popover where I can choose a version to open.
In my opinion the popover only looks good when you press a button from the navigation bar.
I don't want to open another table view, it should be on the same view.
What could be the easiest and fastest solution?
It's an iPad app.
Greets Max
You can create another viewController for multiple chapters. This should contain a tableView that you load with the chapter options. Then use didselectrowatindexpath to load the data for that viewController with the different chapter options for the selection. If you push the new viewController with a navigationController, then the user can easily navigate back.
However, the easiest thing to do would be to present something like a UIActionSheet with the options (provided there aren't too many of them) or make a custom view similar to it and present that modally ( with presentModalViewController).