Re: UIScrollView to UIImage

2013-07-28 Thread David Duncan
The scroll view's bounds.origin is also its contentOffset, which is likely what is happening when you render it in to the context. However, you seem to imply that you just have a simple scroll view with a simple image inside – why do this at all? Instead just use the contentOffset to determine

Printing Problem

2013-07-28 Thread Peter Hudson
All I have assembled several pages of text as RTF in an offscreen NSTextView - outputTextView in the code below. As the text was assembled in the view, I have marked the end of each page with a \page symbol in the RTF. As I have added each piece of text into the view I have determined how

RE: Button on side menu not working

2013-07-28 Thread Julius Oklamcak
There could be two reasons: > [self.view sendSubviewToBack:_menuView.view]; Is placing other UIViews in the view hierarchy on top of the menu view and they could be eating touches. > _menuView.view.frame=CGRectMake(-160,0,160,440); > self.view.frame=CGRectMake(160, 20, 320, 548); UIViews that a

Button on side menu not working

2013-07-28 Thread Devarshi Kulshreshtha
I am able to implement side menu functionality using below code: -(IBAction)menu:(id)sender { if (!_menuView) { _menuView=[[MenuWidget alloc]init]; _menuView.view.frame=CGRectMake(-160,0,160,440); [self.view addSubview:_menuView.view];

Re: UIScrollView to UIImage

2013-07-28 Thread Trygve Inda
Update: CGRect rect = [scrollView bounds]; UIGraphicsBeginImageContextWithOptions(rect.size,YES,0.0f); CGContextRef context = UIGraphicsGetCurrentContext(); [scrollView.layer renderInContext:context]; UIImage *capturedImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext()

Re: when __bridge isn't required

2013-07-28 Thread Charles Srstka
On Jul 27, 2013, at 2:05 PM, Zac Bowling wrote: > The first one is a NSConstantString string. It's not like a malloc'd > NSString. It's effectively a singleton. It doesn't mater how it's bridged > because it can't be released. The second is a new NSURL that is allocated on > the heap. It needs