Skip to main content

Posts

Showing posts with the label ios

fbDidLogin not called

So, I've been messing around with the Facebook iOS SDK for a bit and as of the latest version I can't get the fbDidLogin method to be called. The login process works fine, with Safari used on the simulator and the Facebook app being used when running it on a device. However, after logging in I get transferred back to my app (as I should be) but as the fbDidLogin method hasn't been called, nothing has changed. As far as my app is concerned I'm not logged in. The demo app that is bundled with the SDK works fine. So I'm obviously doing something wrong, but I have no idea how to check what. I triple-checked all the methods used in the demo app against my own and as far as I can see everything looks the same. Any thoughts or ideas on how to debug this? Or has anyone had similar problems?

Edge Detection of Image in iPhone Using Image Magick

I want to convert RGB image into Below Image. I am using ImageMagick Library . I want help to know that by which functions i can convert in Original Image into Image-2. Here is below two images. I would like to use Only ImageMagick Library. I would like to do Image Processing simillar to this Link in Objective C.

What are some great iPhone questions for exercise?

In a small team where everyone is coding away on a project for a little while I want to encourage some different thinking to keep people increasing their iOS knowledge as well as to get a bit more variety in their daily activities. I'm not looking for interview questions involving manhole covers, nor very specific questions about whether drawRect: is part of UIView or UIViewController. I'm looking for questions more along the lines of UIImagePickerController, UIImage, Memory and More! - which has a lot of questions and a lot of great information. I voted it up. I'm thinking of sending out one of these topics about every week and then having a discussion about it towards the end of the week with some examples. Maybe assign a short presentation on a rotating basis so someone gets the job of delivering a 10-minute presentation about the topic, prizes awarded etc. - then when some task comes up involving that topic we may not have an expert but we at least have someone who

How to handle app URLs in a UIWebView?

I recently found that my UIWebView was choking on ITMS links. Specifically, from the UIWebView in my app, if I navigate to a site such as this one and click the "Available on the App Store" link, UIWebView would error out with "Error Domain=WebKitErrorDomain Code=101 The URL can't be shown." After a bit of Googling, I realized that I needed to catch requests for app links and have iOS handle them. I started out by looking to see if the scheme starts with "itms" in -webView:shouldStartLoadWithRequest:navigationType: , but realized that there might be other kinds of app links that the system can handle. So I came up with this, instead: - (void)webView:(UIWebView *)wv didFailLoadWithError:(NSError *)error { // Give iOS a chance to open it. NSURL *url = [NSURL URLWithString:[error.userInfo objectForKey:@"NSErrorFailingURLStringKey"]]; if ([error.domain isEqual:@"WebKitErrorDomain"] && error.code == 101

Is there a way to make drawRect work right NOW?

The original question............................................... If you are an advanced user of drawRect on your ipop*, you will know that of course drawRect will not actually run until "all processing is finished." setNeedsDisplay flags a view as invalidated and the OS, in a word, waits until all processing is done. This can be infuriating in the common situation where you want to have: a view controller 1 starts some function 2 which incrementally 3 creates a more and more complicated artwork and 4 at each step, you setNeedsDisplay (wrong!) 5 until all the work is done 6 Of course, when you do that, all that happens is that drawRect is run once only after step 6. What you want is for the ^&£@%$@ view to be refreshed at point 5. This can lead to you smashing your ipops on the floor, scanning Stackoverflow for hours, screaming at the kids more than necessary about the dangers of crossing the street, etc etc. What

Detect whether browser has keyboard/arrow keys in web page

I have a full-screen game in HTML+JavaScript, which uses the arrow keys as primary controls. This cannot be used on keyboardless Android devices (I haven't tested on iOS), and even if the soft keyboard had arrow keys it would take up unnecessary space. Therefore, I have added onscreen control buttons. However, the buttons are unnecessary (and absurdly large) on desktop browsers, so I would like them to not pop up unless they are needed. What heuristics can I use to decide whether they are needed — that is, whether it is impossible or awkward for the user to input arrow-key events — other than recognizing specific User-Agents (which is straightforward, but not future-proof)? I will of course allow the user to hide/show the buttons; I am looking for useful heuristics for choosing the default setting. Source: Tips4all