motion-awesome icon indicating copy to clipboard operation
motion-awesome copied to clipboard

Button doesn't work

Open forrestgrant opened this issue 12 years ago • 10 comments

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

forrestgrant avatar May 23 '13 15:05 forrestgrant

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?

derailed avatar May 23 '13 16:05 derailed

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

Thanks!

forrestgrant avatar May 23 '13 18:05 forrestgrant

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

cspeer avatar Mar 26 '14 12:03 cspeer

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?

forrestgrant avatar Mar 26 '14 18:03 forrestgrant

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 :)

cspeer avatar Mar 26 '14 18:03 cspeer

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 [email protected] 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 .

derailed avatar Mar 26 '14 20:03 derailed

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

cspeer avatar Mar 26 '14 21:03 cspeer

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 <[email protected]

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 .

derailed avatar Mar 26 '14 21:03 derailed

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

cspeer avatar Mar 26 '14 22:03 cspeer

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

On Wed, Mar 26, 2014 at 4:27 PM, Christopher Speer <[email protected]

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 .

derailed avatar Mar 26 '14 23:03 derailed