XMSegmentedControl icon indicating copy to clipboard operation
XMSegmentedControl copied to clipboard

Add Custom Inset Properties, Option to Disable Image Resizing, Provide Segment Borders

Open dbburgess opened this issue 8 years ago • 2 comments

Borrowing from the approach @randybyrd322 made in #19, this adds properties to provide custom insets for finger-grained control over positioning. Unfortunately, our two pull requests won't play nicely together. I'd be happy to modify mine as necessary to make it work though.

Also, I haven't had a chance to look at how the vertical hybrid style works, so it doesn't modify the insets for that at all. I think semantically, the way contentInsets are done now also aren't quite correct (in plain hybrid, at least...I think it should probably do some combination of the two provided insets somehow).

Also, I added an option to disable the image resizing, as it was making getting the icons to look good challenging for me.

Feedback and suggestions are welcome, I'm happy to modify / improve the PR as necessary. Thanks for the useful / great project! 👍

dbburgess avatar Jun 29 '16 20:06 dbburgess

Looks great. Let me get a working charger so I can use my Mac and then I'll take a look into it. Thanks for your effort.

Sent from my iPhone

On Jun 29, 2016, at 3:14 PM, Daniel Burgess [email protected] wrote:

Borrowing from the approach @randybyrd322 made in #19, this adds properties to provide custom insets for finger-grained control over positioning. Unfortunately, our two pull requests won't play nicely together. I'd be happy to modify mine as necessary to make it work though.

Also, I haven't had a chance to look at how the vertical hybrid style works, so it doesn't modify the insets for that at all. I think semantically, the way contentInsets are done now also aren't quite correct (in plain hybrid, at least...I think it should probably do some combination of the two provided insets somehow).

Also, I added an option to disable the image resizing, as it was making getting the icons to look good challenging for me.

Feedback and suggestions are welcome, I'm happy to modify / improve the PR as necessary. Thanks for the useful / great project! 👍

You can view, comment on, or merge this pull request online at:

https://github.com/xaviermerino/XMSegmentedControl/pull/23

Commit Summary

Add property for custom title insets Add property for custom icon insets Add property to disable image resizing File Changes

M Pod/Classes/XMSegmentedControl.swift (39) Patch Links:

https://github.com/xaviermerino/XMSegmentedControl/pull/23.patch https://github.com/xaviermerino/XMSegmentedControl/pull/23.diff — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

xaviermerino avatar Jun 30 '16 14:06 xaviermerino

Thanks! No problem, I understand...Take your time. I can happily keep using my fork for now. I actually just added another option to provide borders to the segments. I can split stuff up into separate PRs if you'd prefer, and as I said, feedback is welcome if you'd prefer to craft the public interface in a different direction.

dbburgess avatar Jun 30 '16 14:06 dbburgess