-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SplitRow separatorStyle should be configurable #45
Comments
@kmav as I do not have access to macOS right now, feel free to create a pull request with the changes needed to make |
I guess we should also make |
In my case, that I wanted to have two adjacent fields, the leftmost as textrow and the rightmost as button, that issue (separator) appeared because I wanted the button on the right to be a different color (green) than the default. When the two fields of the row had the default color, there was no issue (separator was "hidden"). May I ask, in order to understand, what is the purpose and use of the separator/separatorView? |
@kmav I'm not sure I understand your question: The UITableViewCell's separator is the default way to separate two UITableViewCells from each other and is used in every UITableView - so from my point of view the question would rather be why avoid it in SplitRow which places two UITableViewCells next each other? By default the SplitRow looks like in the following Screenshot, which is part of the README - there you can see its clearly visible: Ideological views put aside: The separator has been there since the very first version of SplitRow and removing it causes a breaking change. Because a lot of people were just fine with it in the past and the breaking change can easily be avoided by making its behaviour configurable, I don't see the need of removing it. EDIT: Added Screenshot to showcase default behaviour. |
Thank you very much for the clarification. So, is it like what we have in a standard table view (horizontal thin lines) in a vertical way? Although with too much difficulty, I see the separator in the screenshot now (I had to zoom) :) As I can see (and experienced in my issue) the separator has not the same height as the horizontal row. It is smaller. That is one way to explain the reason for my issue: with a green field, the separator takes a portion of the left border but not ALL of it. If the length (height) of the separator was equal to the row height then maybe there will be no visible issue for me (i.e. for fields with color) :) With all of my "analysis", I am just brainstorming and trying to understand or propose ideas and help. Your work is excellent and very useful! In any case, we can proceed in the way you suggest (once I get some time) :) Best regards, |
May also depend on the screen how well its visible ;)
Don't worry, no hard feelings here.
The original idea was to mimick the stock iOS Contacts app in edit mode, there you also got this vertical separator - which is not 100% in height as well (email an phone fields for example).
Can't remember the exact details how I got there, totally possible I used an additional view to put everything together - but I guess your basic assumption is correct. The only thing I remember is, it was quite a challenge to put the pieces in the right place :) |
We should expose the possibility to set the SeparatorStyle for the SplitRow with a public property called
separatorStyle
which subsequently sets thetableViewRight.leftSeparatorStyle
to the user defined value:SplitRow/SplitRow/SplitRowCell.swift
Lines 32 to 33 in b60b6ab
The text was updated successfully, but these errors were encountered: