How to darken the reorder control in a UITableViewCell? - uitableview

I have a pale green coloured tableview and when I enter Edit mode the reorder controls on the right edge are almost invisible. Can anyone tell me how to either use my own image for this or darken the system image?

I'm answering my own question because I don't want anyone else wasting time on this. You can't change this... I have resorted to switching my TableView's background colour back to white when I enter editing mode. This is yet one more horrible compromise but c'est la vie! Same with the right chevron in the accessoryView. It would seem obvious that one might be able to set this to the colour of their choice. Not so. The only way I found for doing this, simply darkening the chevron, was to subclass a UIControl and write my own drawRect method. Apple has an awful load of money yet cannot appear to employ enough programmers to keep a handle on this sort of very, very simple UI stuff. It appears that the bigger the libraries get the less we are able to actually do with them.

Related

Add text above image in UIButton

So I have UIButton's all over various VC's and Scenes on my game. Some with images others just plain text. So I want to combine both. I know I can do both but the button is then in the background. Is there anyway I can make sure that the text is above said image and the whole thing is clickable?
Everything i'm doing is via the storyboard and not programmatically but i'm fine with doing programmatic. I'm looking at the API as we speak and it seems that I'll have to deal with edges? Never done that before so, just need some guidance :/
The guide I looked at before on stackoverflow was from 5-7 years ago and applies which is fine but setting the edges isn't as self explanatory as it might seem :/
Here's what I have:
dosplayas.titleEdgeInsets = UIEdgeInsetsMake(((dosplayas.frame.size.height)*(-(2))), 0, 0, 0)
I also tried positive two and I tried it as the first of 4 parameters because the first one is the top according to the API
When setting image, just set background image rather than regular image. it'll allow text on top
Then change text to attributed rather than plain
Then..here's a screenshot:
-click the 3 dots
-change the lining to like 7-20 depending on the size of your text

Full customisation of UINavigationBar

I'm currently building an iOS Application for a client and have hit a pretty huge roadblock. I mean, I could write my own UINavigationBar and such but that would cause a lot of issues further down the road.
I have tried everything in my knowledge so far and have spent several hours searching for a solution (overriding the CALayer, using CoreGraphics and pretty much everything else ) and I get the same result. No matter how hard I try to remove the background of the UINavigationBar, it still shows a white background with slight translucency.
I need to have a lot of customisation on the navigation bar (I.E having a gradient going from "blackColor" to "clearColor" and I can't do that if the background of the Navigation Bar refuses to be completely transparent. I have tried copying all of the CALayers from the UINavigationBar layer to a subview I added and it just kept crashing, even when replacing the delegates and superlayer.
I really need help with this. One of the multiple effects I'm trying to achieve are below. (The blue rectangle is not the focus of the image, it's irrelevant.)
To get it completely transparent:
(UINavigationBar.appearance()).translucent = true
(UINavigationBar.appearance()).barTintColor = UIColor.clearColor()
(UINavigationBar.appearance()).backgroundColor = UIColor.clearColor()
(UINavigationBar.appearance()).setBackgroundImage(UIImage(), forBarMetrics: UIBarMetrics.Default)
(UINavigationBar.appearance()).shadowImage = UIImage()
EDIT:
Using iOS 8.3 looking like this:
Or am I missing something?
You are referring to the top Navbar with the back button and Save button right? I'm just confused as to what the blue box on the image is in reference too.
Anyways, this is an extremely hacky approach but could work:
Set the UINavigationBar's alpha to 0. The Back button and Save button will probably also disappear but you could just add labels to the View Controller at the top in the exact same place. The button's should still be functional even though they are "invisible" but the user will still think they are touching them.
Again, very hacky, but you are free to play with the top part of the View then. I'm sure there's a better way to do this but I'm not near a computer with XCode at the moment and can't test it out, and this fix may not even work but I thought I'd offer up a possible temporary solution.

Rounded buttons in XCode 4.6

I have been looking for an answer to this question on google and other places, but have not found a helpful answer as of yet.
I am making an app on Xcode 4.6 using storyboards.
When drag and drop a Rounded Rectangle Button, it is fine, but when I change the background, it becomes rectangular with no rounded edges. i just wanted to change the colour of button and not anything more, but keep it rounded as the original buttons. Could someone tell me a simple method to achieve this or give me a detailed instruction as I am using storyboard and I am rather poor with XCode programming, so the little the programming, the better.
Thanks in advance.
You probably should check the UIAppearance Protocol documentation for iOS.
Meanwhile, you can use...
[[UIButton appearance] setTintColor:[UIColor redColor]];
of course, with your color.
UPDATE:
I have used an alternative method as I do not understand the suggestions which were given to me as I am not as knowledgeable about XCode programming and didn't want to take the coding route.
This may be useful for others, but what i done was that I in Photoshop, I filled the background black, used the rounded rectangle tool on the whole background and then filled the rounded rectangle with the button colour. This somewhat gave a rounded shape, but is still not as good as the original rounded buttons provided in XCode.
If anyone has any other solutions, I am free to try them out and will comment and update what I will do.
I will select the best answer by looking at which one was the simplest although I have not used that method
I suggest you to use GradientButtons
http://code.google.com/p/iphonegradientbuttons/downloads/list
1) Define regular buttons in your storyboard files.
2) Change their class to GradientButton.
3) If you want a different color, initialize them in the corresponding view.

Design pattern for large quanity of synchronized animations

I have over 150 UIImageViews. I need them to behave like a large ballet. I also need to be able to dynamically choreograph them. Some spin, some duck, some jump (each currently a different UIImageView subclass).
I'm assuming I need to put them all into an NSDictionary, then grab the object based on a key and say "you spin", "you jump", "you duck". And do those moves in sync while the music is playing (no real music, but instead data coming in from an external source). And I have no idea what that music(data) will be until it arrives, and no one's heard the song before. I've setup a while (music){} loop with a large switch statement inside.
I'd like to place all the ballerina's on the view in the nib by hand so that they line up correctly with the subview. None of them change x,y. They might only change z, and maybe swap an image, fade opacity, etc (which I was calling spin, duck and jump). And there is no user interaction here, you're just in the audience.
I'm also assuming I'll need to use the UIView's beginAnimation, setAnimation, commitAnimation methods.
Am I on the right track? What's the best way to achieve this? Any optimizations I should consider?Apologies for all the analogies, it's the easiest way to explain what I'm trying to achieve.
I recommend you look at UICollectionView. There was a great WWDC session about it. I'm not exactly sure what you're trying to achieve, but with UICollectionView you can set up custom layouts and animate between different layouts automatically. So if your images have to move in sync, this might be a good option.

Designing a circular "selector" control

I'm developing an app that calculates poker odds, and now I'm facing some problems with the card selector.
This is a mockup of what I want.
I've found two ways to accomplish this. The first one is to use an entire UIImageView and detect touches, calculate where the touch has been generated, and set the corresponding value.
The second one is to use a lot of UIButtons, but in this case I get problems with the shape of the buttons.
Of course I can use a regular UIPickerView and so on but I think that the one I've designed is better.
if you have a UIButton with a background image that is shaped irregular. then that is the only point that the button can be pressed.
Change the type to custom and put your slices into buttons.
This has been my experience anyhow.
My buttons have to have a .01 alpha background to increase their pad size and people can push the button.
Hope that helps :)
After googled a little i've found https://github.com/ole/OBShapedButton .
it does anything what i need

Resources