iPhone Google Chrome - Tab selection screen (Grouped UIViews) - iphone

I am working on an app for iOS and I have to do a tab selection screen like the Google Chrome app for iPhone (I attached a screenshot). I searched a lot but I didn't found any similar control to use. As i can see, it groups some UIViews and use a UIScrollView to scroll, but maybe any of you could explain me better how this control works or have any solution.
Thank you!
http://i.stack.imgur.com/rCG5g.png

Create Different UIViews with your controls.(One tab is equal to is on UIView)
Add this UIView's on UIScroll View.(This is optional. It's ok if you don't use the UIScrollView and add UIView on self.view
Implement the touch method on UIView.
When you get a particular UIView is touched change it's center position to Center of the screen.
Which will give you the UIView which is touched in foreground and rest of the Views in background.

Hope this will help you .........
I solved my problem with this ......
https://github.com/xxhp/BrowserTabViewDemo

Related

Can someone explain if multi-touch zoom is supposed to work for UITextView or UIScrollView

Has anyone gotten multi-touch zoom to work on a textView?
I have searched SO and found no simple way to zoom in on a UITextView or UIScrollView. I was led to this link which says I need to write custom views to overwrite the existing ones in order to be able to zoom in to a textView. I can not believe this and would like someone to please let me know if there is a simple way to zoom in and zoom out using multi-touch on a UITextView or a UIScrollView.
I tried setting the options in the IB to enable multi-touch as well as the max zoom. But this does not work.
Please advise. Thank you.
1 Create a new project with single view (using storyboard & arc)
2 Open Storyboard and add a UIScrollView to your main view controller
3 Set the UIScrollView's delegate to the view controller and create an IBOutlet for the UIScrollView called scrollview
4 Add a UITextView to the scrollview and set an IBOutlet called textview
5 At the end of the ViewDidLoad add the following code:
self.scrollview.minimumZoomScale = 0.5;
self.scrollview.maximumZoomScale = 5.0;
self.textview.text = #"Hellow World!";
6 Add the following method
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView {
return self.textview;
}
7 Run the project and zoom away!
If you want the text to look not render blurry when use the answer at this Blurry UITextField Question
The UIScrollView class provides support for displaying content that is larger than the size of the application’s window. It enables users to scroll within that content by making swiping gestures, and to zoom in and back from portions of the content by making pinching gestures.
By adding your UITextView to a UIScrollView, you can implement muti-touch zoom.
I am resolving to answer this question myself with the assumption that this is not possible at this time. With a textArea I have found no way to zoom in on the text. I have not found any tutorial or example that shows this is possible.

iPhone Homescreen/Weather app question [relating to views & gesture recognition]

I want to implement the side swiping gesture to go from one objet to another. Just trying to figure out what its called so I can start looking up some tutorials.
Add your view controllers to UIScrollView and set the pagingEnabled property of the scroll view to YES.
The small dots displyed at the bottom of the iPhone's home screen is UIPageControl. You need to configure it to fit your needs.
You can use a UIScrollView to implement paging.

How to make a UIView Scrollable?

Hi there I have a UIView with a bunch of UITextfields. My problem is that my UITextfields are present from the top to the bottom of my screen. So when the keyboard pops up, it covers half the screen and consequently the UITextfields below...What can I do so that all the fields can be edited by simmply scrolling when the keyboard is visible?
You need to embed your UIView into a UIScrollView and then change the size of the UIScrollView when the keyboard pops up.
Just give the view a new transform that moves it up. Eg.
[myView setTransform:CGAffineTransformMakeTranslation(0, -keyboardSize.height)];
Thats also animatable, just give it the same animation values as the keyboards and it will look perfect.
This solution is from XCode 5, iOS 7.0 and Storyboards. It worked for me quite well.
http://www.youtube.com/watch?v=4oCWxHLBQ-A

Adding a viewController as subView programmatically

I am building an Iphone app.
I need to display a settings Menu to the user when a button is clicked. The menu will NOT be covering the whole screen and there is a specific location I want it to appear. How should I do that?
I understand how to set the hidden property of a subview to give the illusion that the subview is not onScreen. However, I need a view controller for this subview ( meaning .m and .h files as well). So How can I add this subview programmatically at a specific location.
Thank you very much
What you are describing is very much the behavior of a UIPopoverController. Unfortunately, that is only available for use on iPad's and not iPhone's or iPod Touches. So if you want to develop this you will need to develop this from scratch.
It's not a UI pattern you see much on the iPhone due to the screen size, but I imagine you will need to build up a custom UIView and add it the main window view with a specific size (smaller than screen size) and with the view's frame.origin set to a value other than (0,0).
Just make sure that what you are trying to achieve falls within Apple's Human Interface Guidelines.
[myView addSubview:myViewController.view];
myViewController.view.frame=...

How can I do this iPhone (segmentedcontrol?) layout?

Please look at this screenshot:
When you tap in another segmentedcontrol, it switches smoothly (try it if you can).
First of all, is it a segmentedcontrol?
Second, how can I add this smooth effect?
Thanks guys.
I just tried. It does not seem to be a segment view.
Maybe 3 dark buttons(or view or views) and a layer that moves and overlay the current selected button.
Everything is well crafted so it looks great ;)
I think I could do that with a big UIImageView (instead of the three buttons) with an UITapGestureRecognizer to get the touch and a CALayer for the selected button