Skip to main content

Posts

Showing posts with the label ipad

Does UIGestureRecognizer work on a UIWebView?

I am attempting to get a UIGestureRecognizer working with a UIWebview which is a subview of a UIScrollView. This sounds odd but when I have the numberOfTouchesRequired set to 2 the selector fires, but when numberOfTouchesRequired is set to one the selector doesn't fire.

List of known differences between "Safari on iPad” and "Safari on iPhone”

My website looks perfect on the iPhone but looks sub-optimal on the iPad. I'm having a lot of trouble finding information on the differences between iPad's webkit/safari rendering engine and iPhones' webkit/safari rendering engine.

Why does mp4 video plays fine on iPad, not on iPhone?

I'm quite stumped on this issue. I have a large library of H.264 mp4 video files that I need to have play on iOS. Originally, I was targeting only iPad, but requirements have changed and now I need to include iPhone. But I've noticed that my iPod Touch, which has exactly the same OS version and build id as my iPad, won't play the same files that I've been successfully using on the iPad. I've confirmed this with a colleague who also has an iPhone and iPad with the same version & build. I've also seen the exact same behavior in the iPad simulator, but until now I figured it was a quirk of the simulator. Now I'm not so sure.

How to print in iOS 4.2?

I want to integrate the print functionality in my app. The document I want to print will be in .doc or .txt format. I am not very experienced in iPhone development yet, so finding it difficult to implement it by following the Apple documentation. If someone could help me by posting some sample code, will be a great help. Thanks in advance. -iPhoneDev Source: Tips4all

Which Flurry library should I use for universal iPhone/iPad apps?

Flurry has a separate analytics SDK for iPad apps vs iPhone apps. If I'm building a universal app to run on the iPhone 4.0+ and iPad 3.2+ (iPad native, not compatibility mode), does anyone know which SDK/lib I should use? And is there any reason I shouldn't use the same SDK/lib for apps running on iPhone 4+ only? (Basically, I'm confused as to why there are separate SDKs at all.) Source: Tips4all

Get launch orientation of iPad app

In my iPad app, I need to run some layout code to set the proper layout depending on the orientation. By default, the layout is configured for the landscape orientation, so in the case that the app starts in portrait mode, I need to take extra action to configure the views properly for display in portrait. In my -application:didFinishLaunchingWithOptions: method, I check the orientation using [[UIDevice currentDevice] orientation] . The problem here is that it always returns portrait even if the app is starting in landscape. Is there any way around this?

Looking for a graph layout framework for iOS

For an iOS application I'm making I need to show groups of elements grouped together according to their type, and different groups of types separated from each other in a nicely done layout. I thought of using an undirected graph, with the grouped nodes all pointing to each other in a sort of circular reference, and then each group as another "meta-graph" with their nodes point at each other in a circular reference as well, hoping that together with a good graph layout framework this could be displayed nicely. Unfortunately, the only framework I keep hearing of is graphviz , but that doesn't seem to have an available port for iOS. So my question is either: Other ideas for how to implement what I need? A good implementation of graph layout for the iOS? An available port of graphviz for the iOS? Update : Please note, I am not looking for graph plotting frameworks, which are the frameworks used to draw graphs and charts (such as pie charts etc)

Program received signal: “0”. Data Formatters temporarily unavailable

I'm working on an iPad app that downloads a CSV file from the web and parses the file into a NSMutableArray. (I'm using the code from http://www.macresearch.org/cocoa-scientists-part-xxvi-parsing-csv-data suggested in another post). When I run in the simulator, everything works perfectly, but when I run on the device, I get the following error: Program received signal: “0”. Data Formatters temporarily unavailable, will re-try after a 'continue'. (Unknown error loading shared library "/Developer/usr/lib/libXcodeDebuggerSupport.dylib") (gdb) Does anyone know why this would pop up? Google isn't helping me here... :( Thanks!

HTML5 inline video on iPhone vs iPad/Browser

I've created an HTML5 video player (very simple) that works perfectly on the iPad and the browser. However, when I open it on the iPhone, I only get a play button which, when pressed, opens the native video player on a new window, on top of all my stuff. That means I lose access to my custom controls and time tracking (written in Javascript), since the video is now running isolated. Is there any way to override Apple's control of HTML5 video on the iphone and get it working like on the ipad? Cheers

"No previous prototype for function” warning

i use shareKit to myself program . but in the FBConnectGlobal, there are some warning, NSMutableArray* FBCreateNonRetainingArray() { CFArrayCallBacks callbacks = kCFTypeArrayCallBacks; callbacks.retain = RetainNoOp; callbacks.release = ReleaseNoOp; return (NSMutableArray*)CFArrayCreateMutable(nil, 0, &callbacks); } like this method, it warning:"No previous prototype for function FBCreateNonRetainingArray"

returning UIImage from block

I have the following code: - (UIImage *) getPublisherLogo { //check the cache if the logo already exists NSString * imageUrl = [NSString stringWithFormat:@"%@/%@&image_type=icon", self.baseUrl, self.imageUrl_]; ASIHTTPRequest * imageRequest = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:imageUrl]]; [imageRequest setTimeOutSeconds:30.0]; [imageRequest setDownloadCache:[ASIDownloadCache sharedCache]]; [imageRequest setCacheStoragePolicy:ASICachePermanentlyCacheStoragePolicy]; [imageRequest setCachePolicy:ASIAskServerIfModifiedWhenStaleCachePolicy|ASIFallbackToCacheIfLoadFailsCachePolicy]; [imageRequest setCompletionBlock:^(void){ UIImage *img = [UIImage imageWithData:[imageRequest responseData] ]; if (img){ return img; } }]; [imageRequest setFailedBlock:^(void){ NSLog(@"Error in pulling image for publisher %@", [[imageReq

What does the origin control do in interface builder?

In interface builder there is a control in the struts and springs inspector that is labeled origin. What does this do and why does changing it for one object change it for ALL objects? As far as I can tell it doesn't have any real effect on the frame rectangle origin as the name implies. Let me explain: Selecting a UILabel and changing the origin to be at the top right as in the photo above puts the frame origin at the point (280,11). However, in code, when you actually ask the frame for it's origin it is given as (211,11) which corresponds to the top left corner of the frame. Therefore, changing the frame origin in interface builder appears to do absolutely nothing! What is going on here?!

Y axis positioning

I have added extra y axis in the graph. When i am trying to display the graph the added Y axis is not visible. I am able to draw graph with that y axis. How can i make that Y axis visible? My code is as below.. CPTXYAxis *rightY = [[CPTXYAxis alloc] init]; rightY.coordinate = CPTCoordinateY; rightY.orthogonalCoordinateDecimal = CPTDecimalFromFloat(3600 * 7); //rightY.majorGridLineStyle = lineStyle; rightY.axisLineStyle = lineStyle2; [rightY setAxisTitle:[[CPTAxisTitle alloc] initWithText:@"New Axis" textStyle:whiteText]]; rightY.gridLinesRange = [[CPTPlotRange alloc] initWithLocation:CPTDecimalFromInt(0) length:CPTDecimalFromInt(15)]; rightY.plotSpace = plotSpace1; NSMutableArray *newAxes = [graph.axisSet.axes mutableCopy]; [newAxes addObject:rightY]; graph.axisSet.axes = newAxes; [newAxes release]; [graph addPlotSpace:plotSpace1];

Xcode 4.2.1 issue : Universal app runs on iPad but not on iphone

I am right now working on one universal application where I am stuck to one point. I was able to successfully launch my application both on iPhone and iPad but since 2-3 days, I am not able to launch my application on neither iPhone nor iPhone simulator but it runs smoothly on iPad/ipad simulator. Also when I run my app choosing iPhone device it shows message like Running the App on iPhone simulator but i am not able to see any effect on my simulator. I am using Xcode 4.2.1 and I guess the issue is pertains to the same. Kindly help me out to resolve the issue. Thank you.