I have written a powerful trig calculator, but I want to use the "linen" background. I have been able to implement this in interface builder, but I get a 'yellow triangle' warning in Xcode that says it is not compatible with something like iOS 3.2 and earlier. And I'm afraid Apple will reject it if says that. I want to know the code that I can use to change both the text color (from black to white) and the background texture (from blue and white vertical stripes to the darker linen). I already know a few ways to test and apply info about the users current firmware version, but I'm always open to suggestions. Any help will be GREATLY APPRECIATED!!! I have just read the first 3 answers and duh I feel kinda stupid, that makes sense. But I would also like to know how to do this and make it like a user configurable "setting" just to make it feel nicer :-) thanks
The linen background is a tiling UIColor. You can create a tile color programmatically and apply this tiled background anywhere you would set a backgroundColor. Even on UIWindow.
If you want to maintain compatibility to old iOS versions, replace the built in background "color" (such as linen) with an UIImageView showing an image of it.
Write a simple app, filling the entire screen with the background, make a screenshot, then place it behind all other UI elements.
Related
I've looked in previous posts in SO and elsewhere for an answer but no luck. I'm putting images in an NSCollectionView as well as just a single image itself but the only border that seems to work is the grey Bezel border. Other types that are available don't show up, like Button or Groove. This is true no matter what scaling option I use, or even if I use it in code. I'm using NSImageView.imageFrameStyle.
I hope someone has some insight into this. I didn't provide any code since I didn't think that's necessary. Using Xcode 10.1, Swift 4.2. Thanks for any help.
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 have an image in UIImageView. Those images are generally of clothes or accessories captured from camera on plain backgrounds. Now, I have to give a functionality to users so that they can remove the background from the actual image which is being shown. Something like what is shown in the picture here. As the slider will move the background will start getting removed more and more. Something like the 'instant alpha' brush in the Preview application available in Mac OS X. I wish to do this in native iPhone app.
I know I'll require some algorithm for image processing to do this. Does anyone have anything helpful which I can refer or use in order to get this done? Thank you so much in advance.
You can render your image in some context, than change all points you need to the color you want, get image from your context and display it again.
This link should help you to get color of a pixel in context.
Note, that this method is too slow, so I think you should remember all positions of pixels you
need to change to make your app a bit faster.
First, let me state what brought this question about: I saw the green checkmark icon in this post and I would like to use it in my own application. However, since it looks so much like the UITableViewCellAccessoryDetailDisclosureButton my assumption is that this green checkmark icon is provided by the iPhone OS in some form or fashion.
So, my question is: how can I use the green checkmark icon and/or other OS-provided images in my own applications?
As a side question: where can I find a list of the OS-provided images (if they even exist)?
Thanks very much for any input :-)
This is not one of the standard images.
To see what you have available, you can add a UIBarButton in interface builder and try different system icons.
I am trying to add badges to the icons in my app. e.g. in the facebook app, in the home page the number of pending requests is shown on the requests icon.
Can someone provide any links/ideas on how to do this?
Thanks,
V
I know this article is a little bit old, but it helps me recently to make a little class to create custom badges. I thought it would be fair to make this class public for everyone. So here it is CustomBadge.
best regard
- Sascha
Lots of ways to do this. You can overlay a UILabel over the icon (which may be a UIView or UIImageView). YOu can put another view on top of the icon, and draw the text right into that view. Or make your icon view be a subclass of UIView, and when you get called to draw, you draw the icon and the number.
Plus, you may want to play with blend modes, shadow, masking, etc., in order to create something that is visually attractive.
I'd probably start with reading more about Quartz, if you haven't already. The rest is just how you wire it all up.
And some other links:
http://scientificninja.com/development/numeric-badges-on-the-iphone
http://th30z.netsons.org/2009/03/qt4-drawing-notification-badges/
alt text http://th30z.netsons.org/wp-content/uploads/qtdrawbadges.png
The Three20 project (its code is part of the Facebook app) has those badges.