Skip to content

[Question] Access to the cell #73

Description

@wow-such-amazing

I would like to have access to the cell that contains a row.
I wanted to create an extension similar to this one, but stackView is private.

extension AloeStackView {
    func cell(with row: UIView) -> StackViewCell? {
        return stackView.arrangedSubviews.first(where: { arrangedSubview in
            guard let cell = arrangedSubview as? StackViewCell, cell.contentView == row else { return false }
            return true
        }) as? StackViewCell
    }
}

I want this access because I want to change second cell's topLeft and topRight corner radius.

Is there a way to do what I mentioned without making stackView public? If no, would it be possible to make it public?

Thank you!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions