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
[HELP] failed on set font/titleColor for UIButton #110
Comments
I'll try to duplicate this, could you create a small project that includes this code? It would help me fix it faster if I could clone a project and get it working (plus that way I know that the code reproduces the bug) |
i am using ProMotion with TeaCup, the main code is:
class AppDelegate < PM::Delegate
def on_load(app, options)
open ArticleScreen.new(nav_bar: true)
#open Colours.new
end
end
class Colours < PM::Screen
stylesheet :about
layout :root do
@scroll = subview(UIScrollView, :content) do
@btn1 = subview(UIButton.custom, :clickme)
subview(UILabel, :title)
subview(UILabel, :about)
subview(UIView, :line)
end
end
def on_load
end
end
# -*- encoding : utf-8 -*-
Teacup::Stylesheet.new(:about) do
style :root,
backgroundColor: UIColor.whiteColor
style :content,
constraints: [:top, :full],
backgroundColor: UIColor.whiteColor
style :clickme,
origin: [10, 10], extends: :rounded_button,
title: "Click Me!"
style :title,
constraints: [:full_width, constrain_below(:clickme, 10), :center_x, constrain_height(30)],
font: 'Cassannet Regular'.uifont(20),
textAlignment: UITextAlignmentCenter,
numberOfLines: 1,
text: '-------------------------------'
style :about,
constraints: [constrain_width(220), constrain_below(:title, 40), :center_x, constrain_height(200)],
font: 'Arvo'.uifont(11),
textAlignment: UITextAlignmentCenter,
numberOfLines: 0,
text: "trying teacup to styling app"
style :line,
constraints: [constrain_below(:about, 10), constrain_size(220, 1), :center_x],
backgroundColor: '#c6c6c6'.uicolor
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
end can this help ? |
Hi, I was not able to reproduce your project (a repo that I can clone would be best, I have very limited time to investigate these issues). At the least, I think the |
thank you :)
The text was updated successfully, but these errors were encountered: