SPUserResizableView icon indicating copy to clipboard operation
SPUserResizableView copied to clipboard

Rotation

Open jhollez opened this issue 12 years ago • 13 comments

If you rotate the view, the resizing no longer works

jhollez avatar Oct 07 '12 13:10 jhollez

Hi jhollez, I have the same problem, got any idea?

BillHu avatar Dec 25 '12 09:12 BillHu

Anyone updated the code to fix this yet? I am experiencing the same issue.

dougb1102 avatar Jan 02 '13 23:01 dougb1102

Any luck? Having the same issue.

Sean12oshea avatar Jan 15 '13 05:01 Sean12oshea

I'm happy to take a look at any pull requests that fix the issue. Unfortunately this code was written for a portrait-only app, so it may not be trivial to make the change.

spoletto avatar Jan 15 '13 09:01 spoletto

The problem is that frame is used instead of bounds, and frame becomes invalid after a rotation transformation. Unfortunately I did not have the time to change it in this code here.

On Tue, Jan 15, 2013 at 10:03 AM, Stephen Poletto [email protected]:

I'm happy to take a look at any pull requests that fix the issue. Unfortunately this code was written for a portrait-only app, so it may not be trivial to make the change.

— Reply to this email directly or view it on GitHubhttps://github.com/spoletto/SPUserResizableView/issues/2#issuecomment-12258449.

jhollez avatar Jan 15 '13 12:01 jhollez

ok thanks guys. Any help would be great.

Sean12oshea avatar Jan 15 '13 16:01 Sean12oshea

Heya,

Rotation works perfect for me. One thing I fixed in the code is that if you rotate and your frames height/width suddenly become smaller than minwidth/height it wouldn't let you resize, that might be one of the issues. I don't think I changed anything else but I might have absently minded changed something. Also I set all the UIautoresize stuff to yes and have the parent set to yes resize subviews.

Here's the code sorry for paste bin, I'm a noob at github and didn't feel like figuring it out today. .m file: http://pastebin.com/cv4kCuAZ .h file: http://pastebin.com/fUVyfDsL

m-abboud avatar Jan 31 '13 02:01 m-abboud

Wow thank you! I will check this out when I get home. This is a huge help.

Sent from my iPhone

On Jan 30, 2013, at 9:07 PM, meese [email protected] wrote:

Heya,

Rotation works perfect for me. One thing I fixed in the code is that if you rotate and your frames height/width suddenly become smaller than minwidth/height it wouldn't let you resize, that might be one of the issues. I don't think I changed anything else but I might have absently minded changed something. Also I set all the UIautoresize stuff to yes and have the parent set to yes resize subviews.

Here's the code sorry for paste bin, I'm a noob at github and didn't feel like figuring it out today. .m file: http://pastebin.com/cv4kCuAZ .h file: http://pastebin.com/fUVyfDsL

— Reply to this email directly or view it on GitHub.

Sean12oshea avatar Jan 31 '13 02:01 Sean12oshea

hi guys.. i've tried @meese solution but it not works.. can you explain why? i've used uirotationgesture.. it seems the same code, because after rotation image continues to collapse! @meese can you post your version?

ghost avatar Feb 26 '14 14:02 ghost

did you use the pastebin version?

m-abboud avatar Feb 26 '14 19:02 m-abboud

Yep.. I've tried ti use ti but it doesn't work :(

ghost avatar Feb 26 '14 20:02 ghost

The frame rotates but when I drags bounds after rotation the frame collapses!

ghost avatar Feb 26 '14 20:02 ghost

I have added solution to support transforms: https://github.com/pionl/SPUserResizableView

pionl avatar Aug 15 '14 20:08 pionl