custom scrollbar in UIWebView iphone - iphone-sdk-3.0

My UIWebView has a huge data to display and the default scrollbar that comes with UIWebview takes lot of time to scroll.
Is it possible to implement a scrollbar on which user can tap and drag that were he wants.
Any hint in the right direction would be highly appreciated.
Waiting for your reply.
Thanks in advance

It depends on the type of the contents you are displaying in UIWebview.
Did you try make use of Javascript calls to scroll to certain ids within your html page?
Take a look at the wikipedia application or Wikipanion for iPhone for example... They have navigation screen so the user can jump to the section of their interest without the need to scroll the whole page.
hope that will help.

Related

What grid/view does Instagram use for the feed?

I'm in the process of emulating an instagram like application for iOS using Xcode and objective-c. I looked around but I could not figure out how Instagram implemented the following grid feed:
https://debsphuong.files.wordpress.com/2014/10/5-volleyball-hashtag-page.jpg
Any insights would be greatly appreciated it. Thank you
That is a UICollection view. when you tap on the button to turn that grid into a single column grid, the cells are resized to the width of the view and reloaded again.

Make multiple NSScrollViews scroll at the same time

I am developing a Cocoa Application for Mac OSX. I intend to have multiple NSScrollViews and I'd like all of them to scroll at the same time if one of them is selected and scrolled.
I saw for UIScrollView there is a method "scrollViewDidScroll" that I could do this with an iPhone application.
Is there anything similar for NSScrollView or a way to go about doing this? Any help would be greatly appreciated.
Your solution is going to require that one of the scroll views will need to receive notifications that the other scroll view is being scrolled.
Apple actually provides some very nice documentation on Synchronizing Scroll Views, which also has some sample code snippets as part of it.

UIWebView: how to hide part of the content of a webpage?

In my app I have a webview that is used solely for displaying the facebook page.
However, the client does not want the top blue bar of facebook to appear; he wants to hide it.
Is there a way to do this?
The bar is 45 pixels, so what I did is I moved the UIWebView in IB in such a way that its top 45 pixels are behind my navigation bar (thus not appearing).
However, this is not an ideal solution, as the user can see that content when he scrolls up, before bouncing. He can see but not touch it, which will be frustrating for some users.
I tried turning the bouncing off, but then the UI becomes too rigid, and not fluid.
I looked up in Google and Stackoverflow for a couple of hours but didn`t find a solution.
Thanks a lot!
You'll have to edit the HTML/CSS of the page itself to hide the HTML elements in question, probably using regular expressions, and feed it into your UIWebView with loadHTMLString:baseURL:.
I've done similar manipulating before and it works, but... it's a different ballgame when the webpages in question don't belong to you. Any time Facebook updates their layout, your app behavior might change until you have time to get an app update approved. Clients want what they want, but make sure your client knows what he's asking for!
First test out the javascript code used to hide whatever elements in the webpage and then pass up to stringByEvaluatingJavaScriptFromString of UIWebView to run it.

Best way to create floating notification iOS

I've got a tabbed iPad application with just about each tab running a UIWebView. I'm getting all sorts of callbacks, like when a user tries to leave the corporate site (which only displays the company site to users). In this case, I pop up a "toast" style window that tells them to click a button to open the page in Safari. I also pop it up with a spinner and no text to indicate that a page is loading. The approximate look that I'm going for is used in lots of applications, but you can see it best when changing the volume on the iPhone or iPad. It's just a translucent rounded square that fades in and out.
Right now I've got it implemented on one of my tabs, and I did it by creating the objects (a spinner, a label, and a UIImage with the square) and then programmatically hiding and showing them using [UIView beginAnimations] and changing the label's text. It works perfectly but I've got these nagging things hovering over my interface in Xcode, and it takes a lot of setup to accomplish if I wanted it to be in another tab, which I do. I can't help but think that there's a better way to accomplish this. I thought about making and adding a subview, but that would leave a white background to the toast. What I'm thinking is creating some sort of object that I can allocate in a tab's view controller whenever it's needed.
What are your guys ideas, or have you done this in the past? I see it in a lot of prominent applications, like Reeder, so I'm sure it's been done more eloquently than I have done it.
Matt Gallagher has a great class called LoadingView here Showing message over iPhone Keyboard. I use it.
MBProgressHUD is a popular library for this, as well.

Objective-C - What's techniques/objects are being used

On my iPhone, when I go into the Settings app, I see "Airplane Mode", "Wi-Fi", "Notifications", etc. and I'm able to scroll through pages and pages of settings.
I'm new to objective-c and I'm trying to duplicate the functionality in my own app, but I don't know enough about the objects and techniques to know what to ask or what to look for. :)
With that in mind, can someone please explain what's going on with the settings app? What is this using? Is it a UITableView that allows me to scroll down the page? What control is being used to store the text "Airplane" mode? What is happening when I click on the ">" and see a new page?
Any tips are appreciated.
While nobody outside Apple can be 100% sure how they implement their apps, some reasonable guesses would be:
The main screen is a grouped UITableView. Each entry is a single cell.
The text and images in the cells are built using properties of UITableViewCell (e.g. the textLabel UILabel for the text "General"). Some of the more advanced items use custom cell views.
Each category view is another UIViewController, pushed onto the viewControllers stack of a UINavigationController.
The on/off switches are UISliders.
It is a TableView
Table View programming Guide
samplecode
These docs cover all you need