Skip to content

Setting Botton/Top offset affects width #343

Description

@Ameya-Garg

When I change the offset of the dropDown to be be more to the left, it will only move to a certain point, after a certain threshold the dropdown will not move more left, but it will become wider with the right side of the dropdown being unaffected while the left side goes further away.

` let dropDown = DropDown()
dropDown.anchorView = sender

    dropDown.topOffset = CGPoint(
        x: -(dropDown.anchorView?.plainView.bounds.width)!/3,
        y: -(dropDown.anchorView?.plainView.bounds.height)!/3
    )
    dropDown.bottomOffset = CGPoint(
        x: -(dropDown.anchorView?.plainView.bounds.width)!/3,
        y: (dropDown.anchorView?.plainView.bounds.height)!/3
    )

    dropDown.cornerRadius = kCornerRadius

    dropDown.dataSource = [
        "option1",
        "option2",
        "option3",
    ]
    dropDown.selectionAction = handleDropDownSelection
    dropDown.dismissMode = .automatic
    dropDown.show()`

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions