Questions tagged "ios" (page No.1)

Calculating relative time

Given a specific DateTime value, how do I display relative time, like 2 hours ago 3 days ago a month ago etc...? ...

Can iPad/Safari Pretend to be a Different Browser to Avoid Nag Screens?

I'm doing more and more of my web browsing on my iPad these days. One of the downsides is that many of the sites I frequent force me to click through a "please install our iPad app" nag screen before allowing me to visit the site. At first it was ...

Call controller method from outside the controller

I have an implementation of the RenderTone method for sound playback and from that method I want to call controller methods. I'm able to acces controller members fine like this: InstrumentGridViewController *viewController = (InstrumentGridViewController *)inRefCon; viewController->count = 7; But what I want to do is call a method the same way. I tried ...

iOS UIScrollView Lazy Loading

i was just wondering if someone could explain this code for me so i can actually learn from it. I am trying to make my app have a scroller that scrolls left to right with loads of pictures (from internet) but the thing is, it must have lazy loading. so ...

iOS UILabel subview sometimes shows up later than other subviews

I have a strange bug where my UILabel, which is a subview of a custom object, doesn't show up until a few seconds later then all the other subviews. Also, if the user touches the screen while the UILabel isn't visible, then the UILabel immediately becomes visible. Has anyone faced this kind ...

Objective-C macros - calling a singleton object's method

I'm working with a singleton object/class, and need to call one of its methods frequently, and from many places in a large project. I need define a macro to handle this, but it's not working at the moment. This needs to handle a variable argument list, too. This is what ...

RestKit: per-request object mapping when using [[RKClient sharedClient] post: usingBlock:]

I need to POST a video to a server in the background. Until now i've been using this sort of pattern when POSTing: - (BOOL)loginUser:(user *)user { BOOL ret = NO; AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; [appDelegate.waitView startWithMessage:@"Signing in ..."]; ...

How to DELETE one emoji in NSString

How to Traversal emojis in NSString There is a NSString method used to traversal substring of NSString NSString *text = @"2012我们 "; [text enumerateSubstringsInRange:NSMakeRange(0, [text length]) options:NSStringEnumerationByComposedCharacterSequences usingBlock:^(NSString *substring, NSRange substringRange, NSRange enclosingRange, BOOL *stop) { printf("%s- ",[substring ...

objective -c delegates syntax query

I am new to objective-c and pretty much confused with the way delegates are used. I came across this code and i would like to use it to clarify some of the doubts. #import <Foundation/Foundation.h> @protocol ProcessDataDelegate <NSObject> @required - (void) processSuccessful: (BOOL)success; @end @interface ClassWithProtocol : NSObject { id <ProcessDataDelegate> delegate; } @property (retain) id delegate; ...

making asynchronous blocks run before other code

I'm trying to fetch a video from the ALAssetLibrary so that I can do stuff with it. I'm using blocks to do it: NSMutableArray *assets = [[NSMutableArray alloc] init]; library = [[ALAssetsLibrary alloc] init]; NSLog(@"library allocated"); // Enumerate just the photos and videos group by using ALAssetsGroupSavedPhotos. [library enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) { ...

Executing method from loaded nib?

I am new in ios development and currently i am having a problem trying to execute a method from a loaded class. HERE IS THE SCENARIO I have a class named "TV_kid", TV_kid will load another class named "Cable_kid" that contain a nib file. That part is not the problem, the issues is ...

Core Data - NSManagedObjectContext vs NSFetchedResultsController

According to apple documentation of NSFetchedResultsController: You use a fetched results controller to efficiently manage the results returned from a Core Data fetch request to provide data for a UITableView object. According to documentation of NSManagedObjectContext: Its primary responsibility is to manage a ...

receiving image data in Django from iOS

I'm taking a picture on iOS and sending it to my Django webapp using the method posted here: ios Upload Image and Text using HTTP POST. This seems to be working on the iOS side of things, from what I can tell. I'm not sure how to access the ...

How to get Amazon product reviews and ranking information in iOS app?

I want to show user Amazon product ranking info and product reviews inside a iOS app, but I don't see there is any Amazon SDK for iOS, so is there a way to do this? Thanks. ...

How to add and execute .sql files in my iOS project?

I've found many tutorials on using SQLite databases in iOS, but haven't found anything that directly references .sql files. Can anybody tell me how I can link an existing SQL database to my app? ...

Why is a CGPDFDocumentRef showing blurry lines on the view? (See Image)

I have a very strange and particular case on which I want to show a PDF on the screen. However, the problem is that my document is showing blurry lines, not shown on the program Acrobat Pro. Watch this image: http://imgur.com/ws4Qi Is this something I can fix (blurry lines) ...

Creating and using streams in iOS 5

Bear with me please, I'm a new programmer. (things I say might not make sense) I'm trying to create an inputStream and outPut stream so that I can write to it using JSON objects elsewhere in the class... I wanted to know if I'm doing it right. Currently, I'm opening the streams ...

How can I "uncrush" PNG's from extracted ipa packages on windows? [pngcrush]

I've been trying to uncrush PNG's extracted from an ipa for a while and can't seem to be able to get anything to work. I don't own any Apple devices (except for an iPod Touch, a gift from a friend) but I want/need an app that has only been released for ...

Does this client-server design make sense? Is it practical?

The basic idea of the application I've been working on is to allow groups of users to collaborate on "Stacks" of flash cards. Eventually, the app will function as a client-server system (with an iOS app as the client, and a Rails app as the server) The requirements of this design, ...

« Previous12345678910 ... 41194120Next »Show All