Ok, got the UIWebView working somewhat by using:
- (void) renderPageAtIndex:(NSUInteger)index inContext:
(CGContextRef)ctx {
UIGraphicsBeginImageContext(webView.bounds.size);
[webView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
CGRect imageRect = CGRectMake(0, 0, image.size.width,
image.size.height);
CGAffineTransform transform = aspectFit(imageRect,
CGContextGetClipBoundingBox(ctx));
CGContextConcatCTM(ctx, transform);
CGContextDrawImage(ctx, imageRect, [image CGImage]);
}
It does show the WebView flipping over just as it would for a pdf,
however in most cases it is throwing up an error, and because of this
missing pages out.
the error:
bool _WebTryThreadLock(bool), 0x4b3d7a0: Tried to obtain the web lock
from a thread other than the main thread or the web thread. This may
be a result of calling to UIKit from a secondary thread. Crashing
now...
Apparently this is caused by trying to interact with UI elements on a
background thread.
Anybody with a little bit more experience know a way around this?
On Jul 16, 12:15 pm, Saqib Saud <
wisesa...@gmail.com> wrote:
> Okay I will, For now im running in alot of problems :(
>
> On Fri, Jul 16, 2010 at 4:15 PM, Melvin Dave Vivas <
melvind...@gmail.com>wrote:
>
> > Hi Saqib,
>
> > Will you be sharing the zoom implementation as well? I'm also interested in
> > doing something similar.
>
> > Melvin
>
> > On Fri, Jul 16, 2010 at 7:12 PM, Saqib Saud <
wisesa...@gmail.com> wrote:
>
> >> Wow! Im working on something else.... trying to zoom in/out pdf page
> >> ...and move it.
>
> >> for me time is short, Im stressing in finishing the job rather than adding
> >> perfection.
>