I have a UIPickerView which is the right size, except I want to background to be a lot smaller, so that the spinning part is bigger within the frame of the picker view.
Is this possible?
Thanks.
I am not sure if I get your question right, but there is no way to customize the UIPickerView controller. The only thing you can do is to overlay the UIPickerView with a custom image like it is shown at Custom background color of UIDatePicker and UIPickerView. There they simply created an image with transparent parts and put it on top of the control.
Related
I have a textfield that, when text is entered, pops up into a tableview. The tableview only takes up the bottom half of the screen, and when the tableview is showing at least one option, I would like to make the rest of the screen an opaque black. (Note, I’m not talking about the color of the tableview itself, but adding a dark tint to the rest of the screen.) The area on top of the tableview also has other elements, so it’s not as simple as just changing the background color. Whenever I try to change it from where the tableview is controlled, I end up just changing the background of the tableview itself.
Here is a visual of something similar to what I’m trying to achieve:
https://images.app.goo.gl/npAE5ga2kCmQ8E2d7 .
Any help would be greatly appreciated!
1) Add your Selection options in new viewController names as optionPopUp(what ever you want).
2) set modalpresntationstyle of your new popUp as over current context with transition style as crossdisolve.
3) set background view color of new popUp viewcontroller with opacity(0.1 or 10%).
**4)**Present you popUp from source view controller i.e in didselectrowat method of uitableview delegate
Using the UIImagePickerController to bring up the following window.
Am able to change the navigation bar color and their text attributes no problem.
How to change the background of this table view's cells AND the background color of this tableView?
Basically all the area that has been painted red is the area I'm trying to change the color of. Please help. Thank you.
UIImagePickerController is not intended to be modified. It should have the system default style and if you modified that, your app will get rejected.
If you want to customize it, you need to look at some custom image picker, not the one that is provided to you by default.
I followed this tutorial http://www.teehanlax.com/blog/reproducing-the-ios-7-mail-apps-interface/ to add more button beside delete button when swiping.
But the problem is the cell need to use clear color so the background image can be seen. But that approach used scrollview to display the content view and the buttons view of tableview cell. If the content view of the scrollview has any background color instead of clear color, it can hide the buttons so these buttons only display a part determined by our finger when swiping on the cell, using clear color for background makes these buttons show without the need to swipe from right to left on the cell.
So anyone can give me a suggestion to use the clear color to display the background image without revealing the under buttons?
You can use MGSwipeTableCell class for creating swipeable buttons with any colour you need. It will not interfere with the tableview cell color as well. It is very easy and quick to implement.
https://github.com/MortimerGoro/MGSwipeTableCell
I want to make transparent xib view from which we can see previous view's uitableview.
I have one view which contain uitableview (listView.xib), from its one of navigation item, we can open one popup view or we can say that one another view(filterView.xib). I want to make this filterView.xib as transparent that we can see previous list of data - listView.xib.
its Works in IOS7 as well <= IOS7?
do it same thing and set the color of the view to clear color and change the alpha value to .5
I have a custom view which I would like to look like a UINavigationBar. Is there a way for me to draw the background the same way a UINavigationBar would?
I don't want to draw an image or a gradient fill that looks like a UINavigationBar - I want to use the same library code (if it is public) that a UINavigationBar does to draw its background.
The drawRect: method of a UINavigationBar is private - you can't use it to draw the background of your own view.
The easiest way round this would be to take a screen shot, trim the image to nav bar size, add to your project, and then either draw the image in your view's drawRect: method, or add a UIImageView as a subview of your view.
Alternatively, would it be possible to use a UIToolbar instead of your custom view?
You could set your view background image and just use an image that has the navigation bar look already filled in.
As far as tapping into whatever the navBar uses to create itself, you are probably out of luck unless you just build a navBar into your app. Otherwise you would end up having to build a custom view at the top of your app, draw everything in manually. At that point, you are probably better off implementing the navBar.