Skip to main content

Posts

Showing posts from March, 2013

Resize any view

https://github.com/spoletto/SPUserResizableView HOW TO USE:      CGRect imageFrame = CGRectMake ( 50 , 200 , 100 , 80 );     SPUserResizableView *imageResizableView = [[ SPUserResizableView alloc ] initWithFrame :imageFrame];     CustomView *otherViewObj = [[ CustomView alloc ] initWithFrame :gripFrame];     imageResizableView. contentView = otherViewObj; // ADD ANY VIEW LIKE UIIMAGEVIEW ETC.     imageResizableView. delegate = self ;     [ self . view addSubview :imageResizableView]; SPUserResizableView .h // // SPUserResizableView.h // SPUserResizableView // // Created by Stephen Poletto on 12/10/11. // // SPUserResizableView is a user-resizable, user-repositionable // UIView subclass. #import typedef struct SPUserResizableViewAnchorPoint { CGFloat adjustsX; CGFloat adjustsY; CGFloat adjustsH; CGFloat adjustsW; } SPUserResizableViewAnchorPoint; @protocol SPUserResizableViewDelegate; @class SPGripViewBorderView; @interf