Category Archives: Iphone

How to pull up a UIKeyboard without a UITextField or UITextView?

Questions: I’m currently developing an OpenGL ES game for the iPhone and iPod touch. I was wondering how I can easily pull up the UIKeyboard? Is there an official, documented possibility to pull up a UIKeyboard without using a UITextField of UITextView? Answers: It’s not “officially” possible – you can’t access the UIKeyboard object at… Read More »

Sha256 in Objective-C for iPhone

Questions: When I use this code to create a sha256 of a string unsigned char hashedChars[32]; NSString *inputString; inputString = [NSString stringWithFormat:@”hello”]; NSData * inputData = [inputString dataUsingEncoding:NSUTF8StringEncoding]; CC_SHA256(inputData.bytes, inputData.length, hashedChars); It returns the hash correctly, but I need to insert a string like this \x00\x25\x53 and in this case, the function returns a sha256… Read More »

Is it possible to send a hash tag to a file url in UIWebView?

Questions: I want to load a html page from a file, and append a hash tag to it. Is this possible? I have tried NSString *filePath = [[NSBundle mainBundle] pathForResource:@”someFile” ofType:@”html”]; NSURL *fileUrl = [NSURL fileURLWithPath:[filePath stringByAppendingFormat:@”#hashtag”]]; [self.webView loadRequest:[NSURLRequest requestWithURL:fileUrl]]; NSLog(@”fileUrl = %@, reachable? %d”, fileUrl, [fileUrl checkResourceIsReachableAndReturnError:nil]); but this tries to look for the… Read More »

Resize images in UIWebView to viewport size

Questions: I’m displaying HTML with some images inside a UIWebView in my iPhone App. When the images are wider than the viewport of the iPhone I get horizontal scrollers which I don’t want because its mostly about the text not the images. Is there a way to resize images displayed inside the UIWebView according to… Read More »