Can someone please tell me how to get a full screen image preview view when someone taps on an image view of a nib... like the one in appstore application screenshots....
it will be a real help...
Thanks in advance
The first thing you need to do is subclass UIImageView.
Then in your subclass make sure that user interaction is enabled (either by setting it in code, or by checking the box in IB).
Then you need to override the touches:DidBeginWithEvent: (et al) methods (they're found in UIResponder), and put the code for what you want to happen inside them. For example, you could create a larger image view, and then attach it to the view hierarchy.
As for making it completely fullscreen, you'd need to set the frame of the image view to that of the Window, and hide any Tab Bars, Navigation Bars, Status bars, etc.
You can hide the status bar by using
[[UIApplication sharedApplication] setStatusBarHidde:YES];
Hide navigation bars:
[navigationController setNavigationBarHidden:YES];
so on and so forth. You should be able to find ways to hide most things by looking at their docs.
Hope this helps.
I actually wanted a control like the image preview in photos and that on facebook maybe....
which i found in the open source three20 repository... google it to find out ....
Related
Safari has a nice popover that is used for controlling the font size. I'm talking about that one:
It's pretty nice, and my question is - how to implement something exactly like this?
Thank you!
There are many projects in github about popoverview, such as this https://github.com/takashisite/TSPopover
One way to implement this is to add a transparent view that takes up the whole screen so that when I touch outside the popover content, it'll dismiss. And the rest you need to do is just add some subviews to your transparent view.
Simple Really, If you want to use a popover then you can see this code PopOver Link
Or you can simply create a UIView containing 2 buttons , let this UIView rollout an animation whenever the UIButton on the bar is clicked and so on and so forth. Let me know for further queries :)
In my app I am showing loading screen when request is sent to server and when response is received I am removing that loading screen.
To display loading screen I used UIView and reduce its alpha to 0.5 so that it shows the background view.
My problem is user is able to click button displayed on background view when loading screen is still visible.
What I want is: User should not be able to click anywhere on the screen when loading screen is visible. Even though I made userInteractionEnabled false for UIView but still user is able to click on button, why?
If any one knows where I am doing wrong and how I can achieve this, please let me know.
Thanks in advance!
The UIView may have interaction disabled but if the button is higher on the view hierarchy then its on TOP of the view so it's still accessible.
If this is a view made in the nib then make sure its at the top of the view stack
Or if its programmatically then add it as a subview at the end of the function or add it mainWindow (be VERY careful adding things to main Window, this is the top of the hierarchy)
Like wise the utility open source library available.
iOS open source project is MBProgressHUD,
it refers to Heads Up Display, a view that is overlayed on another view, typically to show an activity indicator and/or offer a means to interact with the UI. A good example of an HUD is when playing a movie with the built in movie player. When you tap the screen, the movie player will show a series of controls on the display. Another common example, and one that is pertinent to MBProgressHUD, is showing progress indicators on top of an existing view. For example, when accessing a remote service, to provide feedback to the user you may opt to display a “Please Wait” message
you can download the source code from here.
Yes I got it, I did userInteractionEnabled false for UIView so the click event was sent to the button which was on main view.I removed userInteractionEnabled false and it is working fine.
You can use [[UIApplication sharedApplication] beginIgnoringInteractionEvents] when you are sending request to server & shows loading view.When you receives the response call [[UIApplication sharedApplication] endIgnoringInteractionEvents] & remove the loading view.
All my views/pages in apps so far have been full screen UIViewControllers that i push and pop from the stack.
I see some apps create a new view/window that appears about the 1/3 the size of the full screen on an iPad, containing tables of items to select or other UI elements. They are commonly used to allow users to filter the current view they were on.
Seeing them in apps, I guess that they are just adding a UIView to there current screen and change its frame depending on where on the screen they want it to appear.
Or am I wrong? Is there another/better way to do this?
I guess you are talking about UIPopovercontroller. There are several tutorials to build the same.check this. Hope that helps you.
It's a little unclear from your question what the view looks like.
If the view is "attached" to a UI element (has a little triangular arrow connecting it to, e.g., a button) and goes away if you tap outside it, then it's a view presented from a UIPopoverController.
If the view overlays everything and dims the content behind it, is likely a model view controller presented with a presentation style of ether page sheet or form sheet.
Both are common and easy to set up. See the class documentation I have linked.
In most cases, these are probably normal modal view controllers whose modalPresentationStyle property is set to either UIModalPresentationPageSheet or UIModalPresentationFormSheet.
Yes you can make your own UIViews and just add them as subviews. Another option for iPads specifically is with the UIPopoverController class.
I am trying (and failing) to change the navigation bar of the UIImagePickerController .
self.pickerController.navigationBar = myCustomBar;
doesn't work, since navigationBar is readonly.
I still want to change the buttons (and colors) on the default "cameraControls" bar.
Do you know of any way to do that?
Thanks!
=============
Ok.. Thanks for the quick answers! So let me detail a little bit here...
For my application I only need the camera feed, and then I want to add my own buttons to a controls bar. I am not interested in photos (not yet anyways). Do you think it's best that I drop the UIImagePicker and just search for something else?
Thanks a lot!
You should consider hiding the original camera controls using the showsCameraControls and set your own controls using a cameraOverlayView. Both are properties of UIImagePickerController.
You might try searching the subview tree of the UIImagePickerController, finding the camera controls bar and hiding that. Then add a new subview with your controls to replace it.
I'm trying to create a modal status indicator display for an iPhone app, and would like one similar to this one used in Tweetie:
Specifically, this one "shades out" the entire screen, including the toolbar. I don't believe through any normal UIView manipulation, I can extend past the bounds of my window, can I? I believe I've seen a status indicator like this somewhere else on iPhone, possibly when I added an Exchange e-mail account.
I've tried subclassing UIAlertView and overriding its drawRect method. If I don't call [super drawRect:] it doesn't ever display the normal UIAlertView text box, however my drawing rectangle is in an odd size and position.
Anyone have any advice to accomplish this?
Check out MBProgressHUD.
Take a look at the source code to the WordPress application. They have code which you can basically drag and drop into your application to do this.
http://iphone.wordpress.org/development/
I haven't done this myself, but you could layer a UIView at the top of the view hierarchy, and use setHidden to dynamically show or hide it. Since it's at the top of the stack, it should be able to intercept all touch events.