How add two views or image views in landscape mode? - iphone

I want to create view in which when user use in portrait mode then two images scroll in scroll view and when user change mode as landscape then both image views add and become single view. I show this function in restoration hardware apps.I like that so i want to make my apps like that? how do that?

What you ask, is a simple implementation that I could do for you. But then again, you would't learn anything and you would probably come here and ask again. I won't give you the fish, I will show you a way of catching it. Check this tutorial, to learn how to handle rotation and then manipulate your views the way you want:
http://red-glasses.com/index.php/tutorials/iphone-auto-rotation-for-intermediate-developers-tutorial-1/
In my profile you have my personal email, after you learn that, if you need more help, count with me.

Related

How to replicate the CNN iOS app pull down menu

Does anyone know how CNN is doing their top pull down menu?
It looks like a UITableView that is called with a touch drag event but wasn't sure. Googled various keywords but was not able to turn anything up. Just looking for some guidance on how to replicate this behavior.
I've no idea how it's actually done, but I know how I would do it: any view can sit completely or partially offscreen and be dragged onscreen by the user in the usual ways (e.g. a swipe or pan gesture recognizer). There's nothing special about that.
I guess they are doing something like https://github.com/mikefrederick/MFSideMenu
You have to customize "MFSideMenu" a lot though. If you dont want to show this menu on every view you need to disable UIGestureRecognizerDelegate on that view.
There is also something like https://www.cocoacontrols.com/controls/pullableview but you may need to add UIGestureRecognizer to this class.

adding camera as subview

I am adding camera using {[UIImagePickerController availableMediaTypesForSourceType:UIImagePickerControllerSourceTypeCamera]} as a subview to a UIView with fixed boundaries in my app.
Everything is working fine. But all the examples i see shows displaying camera as a modalcontroller as single screen. My doubt is, are there any cases that APPLE will reject if the camera is added as an subview to a view?. Should it be only shown as a full screen modal controller?
There is no rule that says you may not use camera view as a subview. It's all down to the specifics of your requirements and your app. Apple probably won't reject your app just because of such use of the camera view.
For example, Layar app is using camera view as a background for their overlays - clearly not a modal controller.
At the same time, consider the user's experience. If you are providing your user with the ability to take a picture with the camera and then use this picture in further application logic, then using it as a modal controller may be a better approach, as it provides the user with a consistent experience across multiple apps: users do get used to certain experiences and you need to have a valid reason to go against those consistent experiences.
At the same time, if you do have a valid reason why you want to have camera view as a subview (for example, display an overlay layer over it or apply a filter to the preview, or whatever else), then this is a perfectly valid reason for your UI design decision.
So, to summarize, there's no rule against it, but keep the user's experience in mind. Also remember that Apple may choose to reject your app for any reason they choose - and they don't have to explain it to you. At least, that's what you're agreeing to when you join the developer's programme.

Tabs-like behaviour in iPhone app

I have an iPhone app which I need tabs-like behaviour in. I want to show and hide all the views for each tab accordingly. For two tabs, I place all the views on top of the others and make them hide and show accordingly. But when I have to implement 3rd tab, there are a lot of views which I can't place on each other in Interface Builder.
Can anybody tell me how to make an UI for this scenario?
Edit: could you take a look at this and see if it makes any sense?
Ah, I see! Why not just do it yourself with some creatively placed UIButtons? So long as they are in fixed positions, make a sort of radio-group like paring of two buttons approximately 50 px apart from each other and then just set their background colors accordingly. As for the views, they can easily be called to the front with UIView's -bringSubviewToFront: method.

Is it window based or view based app?

I need to make an iphone app like USA Free that's in App Store.
Can anybody, please, tell me what kind of app is this (window or view based) and how it is possible to make horizontal slide effect when changing views?
Thank you!
For transitions, take a look at http://developer.apple.com/library/ios/documentation/UIKit/Reference/UIView_Class/UIView/UIView.html#//apple_ref/occ/clm/UIView/transitionWithView:duration:options:animations:completion:
All apps contain one (or more) windows and views. You might want to start with the basic of creating an app. http://developer.apple.com/library/ios/referencelibrary/GettingStarted/Creating_an_iPhone_App/_index.html#//apple_ref/doc/uid/TP40007595
View based just means the project comes with a default class already setup. You can put anything you want in that class. Window based is just if you want to create all the classes your self. Theres not much difference, so it doesn't really matter which you choose as long a you know how to create the horizontal slide effect your going for.

Switching Between Subviews in iPhone App

So, in an iPhone app I am working on, I've decided that the best way to display all the contents to the user is to have the top part of the screen show some information, and the bottom of the screen show different information. However, the bottom part will change sometimes, so I was working on implementing that.
Another app that does this is the MTGLife app, here are some pictures:
http://picasaweb.google.com/lh/photo/HILMaJPnbLxP6hQRkn_6XA?feat=directlink
http://picasaweb.google.com/lh/photo/d5wpS8x_aRyAEOBpYYIxwQ?feat=directlink
http://picasaweb.google.com/lh/photo/RW-BQfqx-VytRim3BxeRZQ?feat=directlink
You see that upon hitting a button, the picker switches over and displays the log. Hitting the same button switches them back, with a pretty animation. I would like to do the same thing in my application. I'm not sure the best way to go about it though...
I was thinking that I would make 2 UIViews, and then would simply flip between them, but I want to get some opinions first on how to do this, and then a push in the right direction.
Thank you!
The 2 UIViews is a good approach. By using the UIView animations functions, you can switch between the Log and the Picker with the desired transition.
In the UICatalog sample application (see TransitionViewController), there an example on how to animation two subviews