#define ForSaurik 1
+static bool Wildcat_;
+
static CFArrayRef (*$GSSystemCopyCapability)(CFStringRef);
static CFArrayRef (*$GSSystemGetCapability)(CFStringRef);
static Class $UIFormAssistant;
$UIFormAssistant = objc_getClass("UIFormAssistant");
$UIWebBrowserView = objc_getClass("UIWebBrowserView");
- if ($UIWebBrowserView == nil)
+ if ($UIWebBrowserView == nil) {
+ Wildcat_ = false;
$UIWebBrowserView = objc_getClass("UIWebDocumentView");
+ } else {
+ Wildcat_ = true;
+ }
}
- (void) dealloc {
context:@"submit"
] autorelease];
+ [sheet setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+
[sheet setNumberOfRows:1];
[sheet popupAlertAnimated:YES];
}
context:@"sensitive"
] autorelease];
+ [sheet setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+
NSString *host(@"XXX");
[sheet setNumberOfRows:1];
context:@"alert"
] autorelease];
+ [sheet setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+
[sheet setBodyText:message];
[sheet popupAlertAnimated:YES];
}
context:@"confirm"
] autorelease];
+ [sheet setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+
[sheet setNumberOfRows:1];
[sheet setBodyText:message];
[sheet popupAlertAnimated:YES];
context:@"challenge"
] autorelease];
+ [sheet setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+
[sheet setNumberOfRows:1];
[sheet addTextFieldWithValue:@"" label:UCLocalize("USERNAME")];
struct CGRect bounds = [self bounds];
- scroller_ = [[UIScrollView alloc] initWithFrame:bounds];
+ scroller_ = [[objc_getClass(Wildcat_ ? "UIScrollView" : "UIScroller") alloc] initWithFrame:bounds];
[self addSubview:scroller_];
[scroller_ setFixedBackgroundPattern:YES];
[scroller_ setScrollingEnabled:YES];
[scroller_ setClipsSubviews:YES];
- if (false)
+ if (!Wildcat_)
[scroller_ setAllowsRubberBanding:YES];
[scroller_ setDelegate:self];
[scroller_ setBounces:YES];
- if (false) {
+ if (!Wildcat_) {
[scroller_ setScrollHysteresis:8];
[scroller_ setThumbDetectionEnabled:NO];
[scroller_ setDirectionalScrolling:YES];
- [scroller_ setScrollDecelerationFactor:0.99]; /* 0.989324 */
+ //[scroller_ setScrollDecelerationFactor:0.99]; /* 0.989324 */
[scroller_ setEventMode:YES];
}
+ if (Wildcat_) {
+ UIScrollView *scroller((UIScrollView *)scroller_);
+ //[scroller setDirectionalLockEnabled:NO];
+ [scroller setDelaysContentTouches:NO];
+ //[scroller setScrollsToTop:NO];
+ //[scroller setCanCancelContentTouches:NO];
+ }
+
[scroller_ setShowBackgroundShadow:NO]; /* YES */
//[scroller_ setAllowsRubberBanding:YES]; /* Vertical */
- if (false)
+ if (!Wildcat_)
[scroller_ setAdjustForContentSizeChange:YES]; /* NO */
CGRect webrect = [scroller_ bounds];
indicator_ = [[UIProgressIndicator alloc] initWithFrame:CGRectMake(bounds.size.width - 39, 12, indsize.width, indsize.height)];
[indicator_ setStyle:UIProgressIndicatorStyleMediumWhite];
- [self setAutoresizingMask:UIViewAutoresizingFlexibleHeight];
- [scroller_ setAutoresizingMask:UIViewAutoresizingFlexibleHeight];
+ [self setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+ [scroller_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+ [indicator_ setAutoresizingMask:UIViewAutoresizingFlexibleLeftMargin];
+ [webview_ setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
/*UIWebView *test([[[UIWebView alloc] initWithFrame:[self bounds]] autorelease]);
[test loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.saurik.com/"]]];