I'm building a filter view controller.
The top section is a selectable list that the selection is being marked with checkmark.
My problem is that the checkmark pushes my textlabel to the left.
The UITextLabel is aligned right to left.
How do i disable the checkmark from pushing the textlabel so it would work like the ringtone selection viewController in iphone (for example)
You have to handle manually the checkmark adding an UIImage at the left of the UITableViewCell and not using accessoryType because it appears only at the right: https://developer.apple.com/documentation/uikit/uitableviewcell/1623228-accessorytype
But if you want to still use accessoryType you can give more space at the right of the UILabel.
Related
I have a tableivew, I want to add a coachmark on top of the tableview cell. and this coachmark is like a popup.
what I did is uncheck the clip to bonds in this tableview cell so it appeared correctly.
but what happened is when I scroll up/bottom this popup is covered by the previous tableview cell.
so any idea how to solve this issue with making the cell background clear because those cells are colored.
Use followings methods to change z axis distance for your coachmark view
bringSubviewToFront(_:)
sendSubviewToBack(_:) on coachmark or others cells
Example:
cell.contentView.bringSubviewToFront(coachmark)
Situation:
So I have a set of DLradiobuttons inside a custom tableViewCell. The table expands when I click the label(ex. UseVisuals or visual schedule) and shows the options below. After I expand a row, the buttons should be allowed to be clicked, but rather the cell itself is clicked and highlighted.
Issue:
Is there a way to prioritize radiobutton selection over the cell selection?
I created the cells programmatically but the buttons are created in the storyboard. Could it be causing the issue? Should I implement the buttons programmatically as well?
Screen Image is as below
To stop cell selection do
1. By code
cell.selectionStyle = UITableViewCellSelectionStyle.none
2. By storyboard
Select your tableView and change the property Selection as below
I have a UICollectionView with one section, 10 cells and horizontal scrolling using a Flow Layout.
One cell occupies the entire screen, and has a UITextView and two UIButtons.
How can I prevent scrolling if no button in the cell is selected, and if it is selected, how can I scroll to the next cell on a UIBarButton click?
I would also like to preserve selection in order to be able to go back to the previous cell and change the selection if needed.
I am trying to create a UITableView
Here is the code sample
https://www.dropbox.com/s/1t2wnpo110o2r9n/TableBug.zip?dl=0
The problem is , the UITableViewCell only shows 1 cell and shows other cells only after Scroll
OK, after running your code you have one problem.
Because you have an image as a subView of your cell and the image is larger then the cell, some time it will be drawn outside of the cell and hide other cells
So go the StoryBoard and select the table view cell and in the attribute inspector check the "clip subviews" button.
This should solve your problem (it did for me when i run your code)
How can I add stars icons to my UITableView like the ones in the picture ?
http://cl.ly/9bSr
They can be selected (the star icon changes and possibly the row should slide up in the first section).
How to implement it ?
1.create custom cell
2.take one button and set its frame as your need
3.set star image as buttons background image and add button to custom cell
4.replace that cell with your existing table cell