Skip to content

[HELP] failed on set font/titleColor for UIButton #110

Description

@anguskwan
  style :clickme,
        origin: [10, 10], extends: :rounded_button,
        title: "Click Me!"

  style :rounded_button,
        width: 300,
        height: 50,
        #font: "Helvetica".uifont(20),
        #titleColor: "#FFFFFF".uicolor,
        backgroundColor: UIColor.tealColor,
        layer: {
            #shadowColor: "#c6c6c6".uicolor,
            shadowOpacity: 0.5,
            shadowOffset: CGSizeMake(2.0, 4.0),
            shadowRadius: 3.0,
            masksToBounds: false,
            cornerRadius: 8
        },
        clipsToBounds: true

image

  1. if i set font on, the shadow will disappear ... why?
  2. how to set titleColor、shadowPath accurately?something like the code in https://github.com/bennyguitar/Colours-for-iOS/blob/master/ColoursDemo/ColoursDemo/ViewController.m

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