ios draw shape under button - ios

i want to achieve this functionality..!
On navigation change the bottom arrow should animate to left or right button selected.
i know only one way i can achieve this functionality by changing the complete background with bottom home selected to videos selected ..
so that i will have four complete background images with homeselected ,videos selected,etc
is their any better way to achieve this..

There are lots of custom views at Cocoa Controls
Here is search result
Here is some related
SDSegmentedControl
One more
RS3DSegmentedControl
Use them according to your need.

Related

Swift - ios - creating ballon buttons

I want to create a set of buttons that will look like this:
(The selected buttons are those with a different background)
Any ideas for a simple implementation?
Are there any known open source implementations for this?
Thanks!
Following is the library which may be use to solve your problem,
For different appearance you need to give the conditional code for that but with out that your problem may solve with this library or code.
You can download the sample code of RRTagController project here.
For rounded corners use UIButton.layer.cornerRadius. if you set corner radius to half of the box you will get circle. For the border color use layer.borderColor = UIColor.redColor().CGColor.
For the background color of the button you can keep track with selected state of the button. Here is an example of using selected state: UIButton state selected
Next thing you could do is to keep data about selected ones, since the best way to do something like this would be UITableView - seems like every row of buttons have same height, and if you want to send that somewhere you can keep track about what items are selected.
I think the best way is to use UICollectionView.

How to create a see through button with "blurred" background in iOS 7

I am updating my app to iOS 7 and wanted to improve the UI. I want to create a see through background like Control Center. So basically I have a button, which I would like to have a see through and "blurred" background like control center. Thanks!
There's nothing to stop you using a UIToolbar.
Create a UIView as a base view with clear background, add a UIToolbar anchored to it's edges so it fills the view and then add your other controls to your base view above the toolbar.
It'll look for example like this:
The blurring effect is not available as a public API. There are third party implementations available, such as FXBlurView, which I can recommend.
You shouldn't really be using a toolbar. It's called toolbar for a reason.
One way to go would be to take a snapshot image of your background and blur it (you can use UIImage+ImageEffects category included in Apple samples to achieve consistent effect).
You can then just crop the image to desired frame and use it as a background of your button.
Are you looking to have a 'dynamic' blur effect (like in Control Center)? It's still doable, but it makes things more complicated.
You can also create blur effects with GUPImage Framework here is a full tutorial about it iOS blur effect tutorial. The tutorial also explains why you shouldn't use toolbar for blur effect creation

Pagecontrol and UIButton

I'm trying to build an app that uses page control as a main navigation. Here's how it goes i want to have full screen buttons that can be be swiped and when you click on them it takes you to the corresponding view. I know how to implement pagecontrol for images bu not for buttons any help would be much appreciated.
This sounds like a terrible design, but assuming you have some great reason that I'm just not creative enough to imagine, you don't need to use buttons, you can use images and just add a UITapGestureRecognizer to them and trigger on that event. In effect, the entire view (image) will be a button.

What is this iOS Contol and How To Implement it?

I'm confused about:
1) What type of control is the one shown in the picture above. I tried slider, it's not giving that same visual effect
2) How can I implement such a control exactly as seen on the image.
It could be anything, but if i wanted to do it i would do it as a normal custom UIView, that has 3 UIButtons
This control will have a function like, setLevel:1,2,or 3
depending on the integer it will change the image of the UIButton accordingly
1) If you just want those 3 points(Low, High, Medium) you can do as #Omar suggested in his answer.
2) But if you want all intermediate points and the middle (blue) dot as a handle, you can use UISlider and change its minimumValue, maximumValue and thumb images.. See this tutorial
You can have two images one for selected and other for unselected and when any of the button is pressed change the image of button to selected image in button action and other two button will have unselected image.At a time only one button will be in selected state.
Now predefined iOS control have this presentation.
May be you can find in cocoacontrols.org or binpress.com to see if you can download a third controls made by developers.
Also, you can create yourself the control, on the two previous website, you can surely find a lot of control which mimic the display you want. You can download the source code, reverse engineering and build your own control
At worst, build this control from scratch with a UIView (maybe a UISlider) as super class.

iOS: Back toolbar bar button item

I need the back arrow toolbar bar button item.
In identifier of bar button item, there is play, refresh, reload, and stop.
I need the image of play, but flipped 180 degrees.
Is there a way to flip the image with code? If not, where can I find this image?
here's a simple work around:
declare your button with "initWithTitle" and set the title to #"◀" (it's just a unicode symbol).
Use #"▶" for the forward button to make it consistent.
I tried it and it worked for me.
Do a Google search for play button vector graphic. Make the one you want the image of the button. Should still be able to tell the button to maintain it's bar button style.
One straightforward option is to draw a white triangle of the appropriate size and orientation in an image editor, stick it in an image view, and then use that image view for a bar button item's custom view.
I wouldn't try to use the UIBarButtonSystemItemPlay image. I don't know if manipulating system images is expressly proscribed, but Apple generally doesn't smile on misuse of system items. When you get right down to it, it's just a white triangle, so it'd be hard to tell the difference between drawing your own or reversing theirs. That just seems like all the more reason to draw your own.

Resources