derailed / motion-awesome

As if more awesomeness was needed
40 stars 14 forks source link

Button doesn't work #3

Open forrestgrant opened 11 years ago

forrestgrant commented 11 years ago

This code will work:

label( :flag, size: 200 ) do |button|
  self.view.addSubview( button )
end

This code will not:

button( :flag, size: 200 ) do |button|
  self.view.addSubview( button )
end
derailed commented 11 years ago

Thanks for the comment - I've looked into it but can't repro. Button works in both instance with or without text. Which version of motion-awesome are you using?

forrestgrant commented 11 years ago

Finally got it to work... some weird css (pixate) conflict.

Thanks!

cspeer commented 10 years ago

I'm running into the same issue here. FontAwesome Buttons simply do not show up at all. Do you mind sharing @forrestgrant? Thanks :)

forrestgrant commented 10 years ago

Hey @cspeer, all that I remember is that I had some styles via pixate that were overriding buttons, not allowing them to appear. Are you using pixate, or any other styling engine?

cspeer commented 10 years ago

Thank you!

Well, I'm using rubymotion query, but that should not really be a problem I guess. However I found another implementation of the fontawesome fonts for iOS and rubymotion: FontAwesomeKit, which instead of labels or buttons delivers attributed strings or UIImages, which is really great because they work so more naturally with iOS Objects like for example the UIBarButtomItem. Here is a rubymotion wrapper https://github.com/AzizLight/motion-iconic :)

derailed commented 10 years ago

Thanks for sharing your thoughts. MotionAwesome uses attributedstring and hence only currently support labels and buttons. I think we could support other components as well by generating images.

Christopher - just curious, does the sample app bundled with motion-awesome run ok in you env (it does contain a button)?

I not please send me more info on versions and env setup so I can dig thing up.

Thanks! Fernand

On Wednesday, March 26, 2014, Christopher Speer notifications@github.com wrote:

Thank you!

Well, I'm using rubymotion query, but that should not really be a problem I guess. However I found another implementation of the fontawesome fonts for iOS and rubymotion: FontAwesomeKit, which instead of labels or buttons delivers attributed strings or UIImages, which is really great because they work so more naturally with iOS Objects like for example the UIBarButtomItem. Here is a rubymotion wrapper https://github.com/AzizLight/motion-iconic :)

Reply to this email directly or view it on GitHubhttps://github.com/derailed/motion-awesome/issues/3#issuecomment-38722296 .

cspeer commented 10 years ago

Sorry, I didn't mean to advertise this gem or anything. I just thought it was pretty good idea to support images as well. Especially in regards to the UIBarButtonItem. If you could do that as well, that'd be perfect!

Anyway, I cloned the demo project and ran it. However I did not encounter any problems. I can see all views, including the last containing the button. So, I guess I should go back to my code and start figuring out why the button does not show up.

Thanks,

derailed commented 10 years ago

Thanks Chris! No problem, I am all for improving it and making a happier experience, so I am glad you've shared. If you can dig out what's going on in your app as to why the awesome buttons are not working right, then we can either fix and add to the README.

-Fernand

On Wed, Mar 26, 2014 at 3:08 PM, Christopher Speer <notifications@github.com

wrote:

Sorry, I didn't mean to advertise this gem or anything. I just thought it was pretty good idea to support images as well. Especially in regards to the UIBarButtonItem. If you could do that as well, that'd be perfect!

Anyway, I cloned the demo project and ran it. However I did not encounter any problems. I can see all views, including the last containing the button. So, I guess I should go back to my code and start figuring out why the button does not show up.

Thanks,

  • Chris

Reply to this email directly or view it on GitHubhttps://github.com/derailed/motion-awesome/issues/3#issuecomment-38739951 .

cspeer commented 10 years ago

Well, I tried. And I cannot reproduce it. I don't know what happened there, but there is not much I could have done differently this time. So my best guess is that I messed up the frame and made it too small so I could not see anything. But I honestly cannot reproduce it... Sorry. But thanks for your efforts!

Cheers

derailed commented 10 years ago

Thanks for reporting back! Glad to hear it's working again.

On Wed, Mar 26, 2014 at 4:27 PM, Christopher Speer <notifications@github.com

wrote:

Well, I tried. And I cannot reproduce it. I don't know what happened there, but there is not much I could have done differently this time. So my best guess is that I messed up the frame and made it too small so I could not see anything. But I honestly cannot reproduce it... Sorry. But thanks for your efforts!

Cheers

Reply to this email directly or view it on GitHubhttps://github.com/derailed/motion-awesome/issues/3#issuecomment-38748462 .