I'm now learning to write a simple iPhone program. Does anyone know how does the following effect created, i.e., the checkmark?
That seems to me a HUD. There are a lot of alternatives to make a similar effect:
https://github.com/samvermette/SVProgressHUD
https://github.com/jdg/MBProgressHUD
There's no built-in view or control which provides this, but a common third-party one (which also supports progress indicators) is MBProgressHUD.
There is no built in effect for this. You can achieve this with a UIImageView with a checkbox image. Set the UIImageView alpha to .3f.
Related
I'm not asking for the full implementation here.
I'm asking because I don't even know what it is called, if somebody could at least tell me the
class I can work with that.
thanks
There is no built-in class for this. However, it can be accomplished using a UIWindow and some views. You should browse http://cocoacontrols.com, they have quite a few open-source versions of this.
For example:
MBProgressHUD: https://www.cocoacontrols.com/controls/mbprogresshud
DejalActivityView: https://www.cocoacontrols.com/controls/dejalactivityview
MMProgressHUD: https://github.com/mutualmobile/MMProgressHUD
It's just a partly transparent UIView with black background and a corner radius of about 15, containing an activity indicator and a label. You can create it in a .xib for easy layout and then load it as needed.
I am curious as to whether or not there is an open source solution to replicate the flash button in the iOS camera applicaiton.
I have seem many other apps use this, but there doesn't seem to be a native way, so I assume there is a common source out there.
It is possible to get the flash button by using UIImagePickerController class, but most of the camera apps out there don't seem to be using this (or perhaps they subclass it, which is against apple's terms).
I am looking for a way to replicate the expanding behavior of the button. Any thoughts?
It doesn't sound too hard.
The way I'd do it is to separate the right curve of the button (as images), and make a UIView that has the left part of the button and the right curve as subviews.
When it's tapped, slide the right curve and animate the extra buttons in.
You could use a stretchable UIImage (see UIImage documentation) and then just animate the frame changing.
In the Apple 2010 WWDC Sample code (downloadable via iTunes, otherwise I'd post it here), there are several sample applications which use this control. They call the class ExpandyButton. I realize I'm answering my question, but hopefully someone out there can find this useful.
While looking for a similar solution to this problem I came across this code which was extremely helpful. Similar to ExpandyButton it fit my needs better.
https://github.com/ddebin/DDExpandableButton
If you look at the Notes app on the iPad, you can see it uses all native iPhone controls, but they're "skinned" to look like a pad of paper. What's the best way to implement something similar to that? Could I use interface builder and simply change the background image for each of the controls, including the TableViews?
Thanks in advance for all your help! I'm going to continue researching this question right now.
This article from Dr Touch will probably come in handy: Stuff you learn from reverse engineering Notes.app
It's a little more complicated than that. My suggestion is manifold:
Hire a real designer to make the artwork.
Subclass whatever controls you want to skin, and handle this business directly in drawRect:. Interface Builder will not help you in this instance.
Consider drawing your controls programmatically instead of using images; a really cool thing would be to cache the programmatic drawings so that they only have to be performed once.
Best of luck!
I'm taking a look at this widget, and it appears to be a UIPickerView, however I haven't seen anything provided by the iPhone SDK API that allows for horizontal scrolling only. Mostly it's all done vertically. Also there appears to be a custom graphic around this picker, so it might not be that either.
I'm curious if anyone is able to determine if this is indeed a UIPickerView or perhaps a hacked up UIScrollView? The widget is handy -- and I like its use. I found it in some random groceries app in the app store.
Here is the screenshot:
Thanks all.
I'd definitely use iCarousel library:
https://github.com/nicklockwood/iCarousel
The library is really well documented, the code is clean and maintained.
That is totally custom. You could indeed do something of the sort overlaying an UIImageView and an UIScrollView. I'd guess it's a 100% custom. As with all programming, there are many ways to do any single thing.
As I recently posted in response to this question, a class for an iOS horizontal picker control (STHorizontalPicker) has just been posted on GitHub. It's nowhere near as sophisticated as UIPickerView, but it provides the basic functionality for picking numeric values and the underlying foundation is probably a good starting point for adding more sophisticated functionality (it's a UIScrollView containing a UIView with multiple CATextLayers for the markers).
It was designed to be used in UITableCellViews and currently looks like this:
This website has source code for a picker that is aligned horizontally without subclassing it.
That definitely looks like a custom component. I'd suggest getting the .app file off your iPhone, opening up the bundle, and looking to see if there's a xib file for that interface. You may get lucky and find the component sitting in there. My guess is that it's a subclass of UIScrollView, but of course there's no way I could be sure of that without personally knowing the developer or the codebase.
You will recognize pickers by their giant screen-gobbling footprint :-) This is most likely a horizontal UIScrollView with a series of fixed-width labels (or images). The tricky bit is to have the bezel on top with a transparent center pass touches back to the underlying scroll view. Or you can take the easy way out and overlay four image strips (for each edge) and leave the middle open so touch events go directly to the scroller.
It's a custom control, but it's really not that hard to build.
I haven't found any references to apps that use a custom activity indicator -- would be an animated GIF old-school -- in place of the Apple-supplied spinning wheels. Are there facilities to do this (or subclass UIActivityIndicatorView), do developers roll their own UIViews, or does this violate HIG?
Thanks, IPD
Yeah, as Ed Marty mentioned UIImageView supports the animation of images. So look at this custom activity indicator tutorial to get an inspiration how you could achieve this in a very simple way.
Cheers
The UIImageView class supports animation. Try that.
Or you can use an animation to rotate the layer.
Here is an interesting post about how to do that :
http://www.cimgf.com/2008/10/25/core-animation-tutorial-slider-based-layer-rotation/
Hope this helps.
Thierry