I want to recreate the list of UIButtons (that's what I think it is, at least) that can be seen all over the place, like in the Settings app:
They look like the standard UIButton, but where the top button does not have any corner radius on its bottom left and right corners, the same goes for the bottom button, and all buttons in the middle don't have any corner radius.
They might not even be buttons at all, maybe some kind of table view? I don't know. What are they and how do I add them to my app?
That's actually a UITableView in grouped style. Each of the "buttons" is a UITextViewCell. See http://developer.apple.com/library/ios/#documentation/uikit/reference/UITableView_Class/Reference/Reference.html for more info.
Related
I have the following (buttons not show up when running the app somehow-they are behind my view, which is a Google Maps view by the way):
If I click on either buttons, go to Editor/Arrange there is no possibility of sending/arranging the buttons forward, only backward. Why is this happening? How can I make my buttons visible?
You have added the UIButtons inside the mapView as subviews. Move them outside of it, simply drag them out of the MapView and add them below it on the left column tree.
When you move them out, make sure they are BELOW the MapView in the left column.
The ones below on the left tree are the ones that end up on TOP.
you can use this function
[self.myButton.superview bringSubviewToFront:self.myButton];
this will make myButton on top of all it's superview's views
apply it in the way you need it
You have to put your UIButtons out side the Map view,
Something like this:
I currently face a problem when using UIButton. I have the background image designed by others like this:
background image
and I need to place the title for the button right after the white vertical bar in the background image. I tried to set left edge for the content but since I used auto layout, the frame will be different with different screen size(3.5", 4.7"...).
Is there a way to put text in the position related to background I want with auto layout.
Thanks
I personally would split the left side of the background image from the right side. This way you can have two UIButtons next to each other with horizontal space constraint of 0. The right side of the button will have to be placed inside a UIImageView so you can set the image as a property of the view rather that the button's background. You don't have to do this of course, but I prefer this solution as it is easier to manage across different screen sizes.
Here is a visual representation of what I explained above:
Separated Views for Single UIButton
You will then need to route the touch events of both buttons to run the same method or function, just so that both the right side and the left are clickable.
Note: I'm not sure exactly what you had in mind for the highlighting of the button, but this will have to be tested and adapted to get the desired effect.
I have this design here : http://imgur.com/XHMBUdj
I would like to allocate the left half of the screen(splitting vertically) to panning up and down for the blue bars and allocate the right half of the screen(splitting vertically) to panning up and down for the red bars.
I can already use UIPanGestureRecognizer, however, I just need help making the region in which if the user pans on the right side of the screen, "this" happens and if the user pans on the left side, "this" happens.
A friend of mine recommended using UIBezierPath. Could someone help me out? Code will be much appreciated!
I looks like it would be easier to have two UIPanGestureRecognizers.
In your view, you can add a subview that take up the left half on the screen that contains the blue bars and the microphone and add another subview that is on the right half of the screen containing the red bars and the music icon.
Then you can create two separate UIPanGestureRecognizers and add one to each of the views. Then each side will have its one recognizer that will take care of the side detection for you.
This might be a simple question but using storyboard I can't seem to position my table, a message field and a button correctly. In the picture below, if it's positioned that way, only then do I get to see the text field and button at the bottom of the screen and the table view takes up the rest of the screen. If I drag the text field and button to the bottom and resize the table, the text field and button disappear and the table is cut off. Why is that? Is there a solution to this without doing it programmatically?
Easy solution is to remove all constraints then position them where you want them.
You'll find you get different effect when try to reposition items depending where you drag from for example double tap an item and nudge it with arrow keys or grab the middle to move it resizing via the corners.
But in my opinion it's easier remove all constraints from the view and then set them as you go.
Also you might want to consider using a container view for the table view and have a separate UItableViewController that way you can easily separate out that the tableview logic from the other ViewController. It will help stop things getting a little messy later on as project grows.
I'd like to design a view like this:
Each "section", which looks like a two-cell section in the mockup, are actually or should behave as a whole, I mean, both the blank upper part and the lower part with the disclosure indicator should be an only tappable unit and navigate to another view, I drawed it like two cells because I need the disclosure indicator to be vertically aligned to the bottom.
Should I set two grouped table views with three sections each one? Is it possible to change the corner radius of a grouped table, the space between sections and the right/left margins of the table? And change the alignment of the disclosure indicator?
Or should it be better to design a view like this with buttons? Is it possible to put a custom disclosure indicator in a button, or such symbol is only intended to appear in table cells and may break the iOS Human Interface Guidelines?
Thanks!
Collection views is the best for this.
Each little box with be its on UIView, reminds me of the card app they created in iTunesU, coding together.
Hope that helps.
UICollection view is the best but if you need to support iOS5, in that case you can use plain UITableView create a custom UITableViewCell with the contentView you want with appropriate padding.
I made something like this some time ago.. There are 2 options for you to develop this..
If you are supporting iOS 5.0 and below then you can make a grid view using TableView. (The code is in this tutorial http://www.edumobile.org/iphone/iphone-programming-tutorials/images-display-in-gridview-on-iphone/). Customize it a bit for your button and ImageView size.
If you are only supporting iOS 6.0 and above then you can use CollectionView and then customize it according to your needs.