I'm overloading my brains on this one.
I've created a table, which contains custom cells (one of a kind). A few days back, I changed the background to the grey you can see in the picture below here.
Now I don't know how I did that....
I don't think I did this programatically... What else would explain the color in IB?
I also searched my sourcecode, and the line for coloring the cell through code is commented out.
I need to reproduce this coloring on other custom cells. How the heck did I do this? :D
Ah, I thought of the answer while getting a cup of coffee:
Change the tableView's background (so, an other .xib-file) to the grey color to get that effect...
Related
Does anyone have suggestions on how to achieve this kinda animation in either UITableView or UICollectionView (animation below)? It also seems to work properly with ScrollToTop behavior (by not going into the grey areas).
I'm thinking the new cells are added after the resistance animation concludes. It's interesting how everything stays in place though. Any help would be appreciated :).
This is similar as UIRefreshControl. Instead of showing activity indicator, it has custom animation. You can sub-class UIRefreshControl and set background as Blue (Dark Blue?). So when you scroll down you won't see grey area (I assume this is your question).
Once the UIRefreshControl trigged its action of Value Changed, you do the animation that move the calendar down.
http://www.jackrabbitmobile.com/design/ios-custom-pull-to-refresh-control/
You can check this code, hope that could help. :)
This is something i have been trying for past few days but not able to make a breakthrough
I have a textView in each cell of a UICollectionView.What i would like to do is to have a different color for only the first row of the grid.
I have used the solution from the below link from rob mayoff and it works fine for a label but not a textView
How do I alternate a UICollectiveViewCell's background color based on row?
I can see that the UITextView is superseding the UICollectionViewCell properties.
Any idea how can this be achieved?
Thanks.
i think i made some progress here. i have set the background color of the textview to clearColor . in this way, the color of the the collectionviewcell shows up.
I am not sure whether this is the correct approach
I'm having a similar problem to this question: UITableViewCell separator not showing up.
However, the proposed solutions don't work for me. Specifically, I've checked the following:
My UITableViewCell subclass does not override drawRect:.
I don't have a custom UITableView and, therefore, I'm not overriding layoutSubviews.
In Interface Builder, I have the Separator attribute of the Table View set to "Single Line".
I've tried programmatically setting tableView.separatorStyle to UITableViewCellSeparatorStyleSingleLine.
But still the separator line will now show up… Does anyone know of something else that could cause this behavior or have any ideas for how I might track down what is hiding/removing the separator line?
EDIT:
Well I feel silly… In trying to create the screenshot requested by valheru, I noticed that the lines ARE there, but are almost exactly the same color as the background, so I couldn't see them until the screenshot was blown up. I had suspected earlier that the separator color might be the issue, and I tried testing for that by setting the separator color to white (my background is almost black), but it turns out that there was some copy/pasted code that was programmatically resetting the color to the almost-invisible color.
Thanks valheru for leading me to the answer. :-)
Check the height of your table view's row and the height of the cell. Make sure that the row's height is not less than the cell's height.
I'm sorry about I can't upload images because of my low reputation point.
(Screenshots)
http://twitter.com/hseongeon/status/410214108881907712/photo/1
http://twitter.com/hseongeon/status/410214156785029120/photo/1
In most iOS development cases, turnaround effect appears on cells by selecting themselves.
As you can see in my screenshots, however, sometimes the effect make a view's background color and text color what I don't want to be. (like badgeView in my screenshots)
I'd like not to change my badgeView's color when cells are selected.
How to do this?
Thank you in advance.
Set the property selectionStyle on your cell to UITableViewCellSelectionStyleNone. This will prevent any calls to setSelected or setHighlighted on your cell.
I've been searching through here and googling like crazy for a possible solution to this problem. Thus far I'm turning up exactly nothing that actually fixes it so I'm hoping someone can help.
I'm working on the UI for a iPad app. I'm doing it using interface builder. I worked with storyboards briefly but I don't like them all that much so I'm sticking with IB for now. Unfortunately I'm not very experienced with the workings of IOS Ui but it's been going relatively smoothly so far. In my app, I have a view controller, which holds a view containing a pair of sub views. One subview contains a rather windows like header bar (i like the look). The second contains a UITableView. The UITableView is set up properly as far as I can tell, and feeds it's info from a data source using custom UITableViewCells. The UITableView is set to grouped though currently there is only one section. The table is in edit mode by default because I want the user to be able to add new items and use the VC as a selection dialog. The view controller is presented (rather than pushed) using UIModalPresentationFormSheet (again, because I like the view) but I don't know that has any bearing on the problem. The cell border is flush with the X origin, the only reason the text isn't currently starting there is because I went into my cell and move the label over, leaving a gap between the edge of the cell and the label containing my text.
The Offending View http://bit.ly/144cbjT
The Problem: The UITableViewCells, for some reason are positioning themselves at X: 0. This puts them outside the border drawn on the UITablewView when you set it to grouped style. I could probably just turn off the border and get away with it, but I like the look so i want to keep it. I've tried messing around with constraints and anchor points on the cells, the content of the cells, the table itself, the view... I've tried simply moving my cell's labels over a bit. I've also had clipping subviews turned on and off. I've made sure the controls are being loaded properly from the XIB. I've made sure everything is added as a subview where needed. I've made sure I've tried everything I could think of short of setting the cell's X position in code. But since I'm not sure how to tell where the border is, I'd rather have the tableview or the cell do the work itself.
The question: How do I fix this? The selection accessory should be outside the grouping box. The text should be inside, not bleeding out onto the background like it is.I believe the content of the cell should be displayed inside the border within the yellow area.
The odd thing is, this is my fifth or sixth table in this app and I've been doing them all basically the same. Thus far this is the only one I've had trouble with.
Can anyone shed some light as to what's going on?
Thanks in advance
I think that to get this in code, you'd have to do something explicit, so the most likely candidate is a messed up IB file.
Since it doesn't cost anything, I'd just delete the tableView from the IB and then re-add it. If that doesn't work, try recreating the complete IB.
Hope that helps