I'm looking to create a custom UIView (like the above realtor.com app) so when the user selects send email or something to that effect a little view pops up confirming the action then disappears. Any direction, tutorials or code snippets would be greatly appreciated. Also what is the correct terminology of what I'm looking to do? Please excuse my ignorance on this subject.
Use Custom UIActivityIndicator that you can found in this link
https://github.com/jdg/MBProgressHUD
This is not Apple specific controls. You can create them. The pop up shown in first image is very easy to make. You'll have to use 3 controls to make it.
1) Background UIImageView with the image.
2) UIActivityIndicatory
3) UILabel with whatever message you want to display.
MBProgressHUD is an iOS drop-in class that displays a translucent HUD with an indicator and/or labels while work is being done in a background thread. The HUD is meant as a replacement for the undocumented, private UIKit UIProgressHUD with some additional features.......
There is more option that useful for your work, For mor information go to above Link
Why not use something that's already available? Take a look at ZAActivityBar (https://github.com/zacaltman/ZAActivityBar) which handles creating 'toast'-like popups.
It's a part of CocoaPods, so it's very easy to install.
yes you can customize,go throgh below steps
1)add selector to your sendEmail button
2)in that selector function create one view, and add your emailSent image as a background
3)now add this view to mainView simply by addSubView
or for nice than above
1)add selector to your sendEmail button
2)in that selector function create one UIControl of size 480 x320, and add a imageView to it & if you want also can add one ok button
3)now add selector for UIControl, in that selector function just remove your view from sperView
4)now add UIcontrol to mainView
Here you can find the source code for showing toast like android
https://github.com/scalessec/Toast
Related
I want to add more than 8 buttons in UIAlertView but when I am adding buttons, they are covering each other and not scrolling. The title is also hiding.
How can I resolve this and add some scrolling in the alertview ??
Seems like this kind of question comes up at least once a day on StackOverflow, but if you want to mess around with the various components within a UIAlertView, the short answer is: DON'T.
If you look at Apple's documentation for UIAlertView, within the first screenful of text it states:
Subclassing Notes
The UIAlertView class is intended to be used as-is and does not
support subclassing. The view hierarchy for this class is private and
must not be modified.
This means that there's a decent chance that any mucking around within UIAlertView hierarchy could catastrophically break your app in future iOS release.
So if you want to add scroll bars or bells & whistles, you really should create your own custom UIView (which looks like a UIAlertView, but is wholly of your own creation)
If you have more buttons then UIActionSheet is the best option than using UIAlertView. If you dont want to use UIActionSheet there is always a custom View to your rescue!
You should really rethink your UI if you need more that 8 button in a UIAlertView. 8 button is the maximum the standard alert view can handle.
Either build your own alert view or use a normal view controller with a table view.
Not sure if it's necessary but as an alternative, you can present another ViewController/ModalVC that will have all the attributes that you may require....
Just move ahead with CustomView, Otherwise not possible with UIAlertView to meet up with your requirement :
Reference links :
http://iphonedevelopment.blogspot.in/2010/05/custom-alert-views.html
http://iosdevtricks.blogspot.in/2013/04/creating-custom-alert-view-for-iphone.html
https://stackoverflow.com/a/6965828/434898
If you want to add many buttons you can use a custom implementation for the alertView.
A nice example is FUIAlertView
Or you could use WEpopover and add to it a table view.
Here is the requirement of my application:
There is a calendar type view which will show Date, Day, Total work hours of that day. What I need, when I click anywhere in that particular square block then it redirects my page to a new view.
I am thinking to should add multiple button and UIView on that button.
That can solve my problem but it is little bit problematic. How should I to do this?
Please look at UITapGestureRecognizer for your view. I think this is what you're looking for.
Here is a link to a tutorial on using UITapGestureRecognizer
Create a subclass of UIControl and a XIB with a UIView in it. Set the class type for the UIView to your new UIControl (not the file owner but the UIView). Then in the UIControl in the initWithCoder: method create the display component and add to view. Then set up you properties that you need to populate those controls.
To use this new control place a UIView where you want it on your screen and size it. Change its class type (in the inspector) to your new subclass. Now you can add outlets and actions to this view just like you would a UIButton. The only downfall is can't set the display controls from the inspector, you'll have to do that in the program. But the good side is you get a similar interface to a button and you can make it look anyway you like.
Hope this helps.
I want to have a custom view for UIActivityIndicatorView rather than relying on options given by iOS. How can I create my own view here?
I have a list of images with me to create a animated view.
As you haven't specified the case in which you want to use the activity indicator,
check the below tutorial blog for custom UIActivityIndicatorView,
Custom UIActivityIndicatorView (EDIT: This link is gone)
Showing a "Loading..." message over the iPhone keyboard
This is implementation of custom UIActivityIndicator from scratch ready for integrating.
Abhinav, if you want to use a set of images you could as well use a UIImageView. Set the animationImages and start-stop as you wish.
This one looks nice and clean, can be hooked to the code easily too.
I'm trying to build by very first app so excuse my ignorance. I love the sample code that Apple put together here called ViewTransitions:
http://developer.apple.com/iphone/library/samplecode/ViewTransitions/Introduction/Intro.html
I want the transition to occur after a user taps the screen once instead of the button like the code does.
Thanks!
Change the inherited class of your xib to be UIControl.
Implement the touch events in your view.
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.