Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Button Custom Renderer on iOS

$
0
0

I have created a custom renderer for a button and added a second UILabel to the UIButton.
I have positioned it before the TitleLabel and everything seems to be working ok although Im not sure that I am positioning it using the best method.

My question is this, when using the button, the TitleLabel text shows a tap effect when pressed (it fades out, or an overlay fades in, not sure), how do I get my added UILabel to receive or participate in the out of the box pressed effect?

I have literally no idea how the native effect is accomplished and Im a bit new to Xamarin in general so its been slow going.

Regarding my comment on positioning, I am positioning my new UILabel in the LayoutSubviews() overridden method and positioning the TitleLabel by changing the TitleEdgeInsets. Is this the proper place to do this?

Thanks for any info.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>