iphone

[ObjC] Custom UIImageVIew with touchesEnded works only with the first view

Hi! Sorry for bad title :( I've a controller that has a scrollview where I display some other views, in this case an IngredientImage, that is a subclass of uiimageview: #import "IngredientImage.h" @implementation IngredientImage - (id) initWithImage:(UIImage *)image { if (self = [super initWithImage:image]) { } [self...

Rotating a UIImageView greater than 180 degrees in an animation

I'm trying to create an animated meter (like the gas tank in your car). I can't seem to get CGAffineTransformMakeRotate to rotate past 180. I've attempted to do it in 2 separate animations (eg: rotate 180 degrees and then rotate the remaining degrees) but it looks terrible since the timing of the total animation changes frequently on use...

How do you make an iOS app launch a captive portal (hotspot login)?

When using Safari at a place with a captive portal like Starbucks, iOS devices will launch a special modal webview to authenticate with the portal. I've seen third party apps trigger this so it's possible to do outside of Safari but I don't know how. It doesn't seem to come for free just by using Reachability or making a network request....

How to localize special ressource types like sounds, images, movies, html files and so on?

I know I can use NSLocalizeableString() for strings. But how about about other kinds of resources? I guess there are some kind of language folders where I put that into? Is there an good blog article that describes this? ...

how to find location using wifi in iphone

Hi all In my app, I am trying to figure out the location of my app user using WiFi (not GPS because my main area is inside the buildings), can any one please tell me how can I get user location using hotspot of WiFi. Any basic guide or example is good . Thanks in advance. egards ...

iPad Catalog app with 1000s of images

I am building an apparel catalog on the iPad. The app will contain over 2000 jpg product images at 2048 x 1536 @ 72ppi, plus 2 sizes of thumbnails for each image. The large size of the primary images is to allow for zooming in on the products at reasonable resolution. The larger thumbnails will be displayed on each page to show alternate...

How to use Tapku library for iPhone?

I just found the Tapku library and would love to use the calendar, but am clueless as to where to start since I am new to iPhone dev. How do I go about presenting the calendar in one of my views? ...

Detecting of scroll bar is visible in the UIWebView

I need to detect if the scroll bar is visible in the UIWebView, how do I do this? My first attempt was: int scrollHeight = [[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.scrollHeight"] intValue]; if(scrollHeight > [webView frame].size.height) NSLog(@"Scrollbar is visible"); But the scrollHeight is alwa...

Please confirm: NSTimer is to repeatedly make an event occur at intervals.

I'm trying to make an iOS app. As part of the app, I want a UIScrollView to scroll every X seconds. I believe that I need to use NSTimer. Is this correct? ...

Trimming audio file on iPhone using core audio

I am trying to do what I naively thought was the simple task of trimming off the front and back of some audio my app records from the mic. Right now I have a PCM audio in a .caf file that I need to trim from some timeindex to some timeindex. I have discovered ExtAudioFile... methods that seem to do what I want, albeit criptically. There...

iphone/ipad troubleshooting device crashes due to memory

I have an app that often crashes on the device (iPad), but not on the simulator, so any simulator debug tactics (MallocStackLogging for example) are not an option. What I usually get in the console is this: Received memory warning. Level=1 Received memory warning. Level=2 Program received signal: “0”. Data Formatters temporarily unavai...

Add to NSMutableArray

I have 2 doubles with each iteration I want add to a NSMutableArray but I can't seem to make it happen. NSMutableArray *touchArray = [[NSMutableArray alloc]init]; [touchArray addObject:[NSString stringWithFormat:@"%d", "%d", tapTotal, touchBegin]]; NSLog(@"array: %@", touchArray); The console prints 14108 as the value for the ar...

How to scan a thing from a iphone application

i want to know how to scan a paper from a iphone cam and i need to read the data on the paper later i want to store the data... is it possible..? please give me a thought... Thanks.. ...

Web-Radio Streaming on the iPhone

Hello folks. I've seen a number of radio apps for the iPhone that stream internet audio such as MP3, AAC, etc. I've been questioned by my boss about the possibility of making a radio app for a client, but have no idea of the requirements, limitations and/or possibilities. What exactly is needed for a radio streaming app? An mp3/AAC fi...

merging an nsarray into an nsset and avoiding duplicates in objective-c on iphone

Edit: better example... So I have an NSMutableSet of "existing" objects and I'd like to download JSON data, parse it, and merge these new objects with my existing ones, updating any duplicates with the newly downloaded ones. Here's what the existing set of objects looks like: NSArray *savedObjects = [NSArray arrayWithObjects: [NSD...

UIView animations completion block firing when an other animation begins

I use the block base API for my animations on iOS. One animation has a completion block and that block is called at the end of the animation, nice. However, that animation can be fired multiple times when the user scrolls (the animation is on a UITableViewCell). When that happens the the completion block is called multiple times. The ...

NSDistantObject Protocol for iphone

I've been reading through the docs on how the NSDistantObject class and I can see that it is more or less a binary protocol for sending objects from one NSPort to another. What I'm curious about is the possibility of using this in an iPhone application to share data. Is it possible to have two applications talking to each other on distin...

File's owner not responding when control dragging

Hi, I am beginner in iphone dev so excuse the simplicity of the question. When I do control drag from a slider in my view to "file's owner", the methods available in my file's owner class do NO LONGER show up. In fact, I can't even slect "file's owner" anymore. I can however select "first responder", and it's methods do show up. When...

hiding tabbar and navbar

hi, I have a uiwebview in a navigation bar which is in turn inside a tabbar item. I want to know how to hide the tabbar and navigation bar the moment the user takes off his finger from the screen just like hiding the toolbar in the default photos app in the iPhone. I should also be able to show the tabbar and the navigation bar when i ...

Possible risk with asynchronous request and delegation

Hi, I would like to add to UIImageView the capacity to set an image with an url. As result I would like to do something like. [anImageView setImageWithContentAtUrl:[NSURL URLWithString:@"http://server.com/resource.png"]]; So I created a category (code below). NSString *kUserInfoImageViewKey = @"imageView"; NSString *kUserInfoActivit...