ios

SQLite3: Batch Insert?

Hi everyone. I've got some old code on a project I'm taking over. One of my first tasks is to reduce the final size of the app binary. Since the contents include a lot of text files (around 10.000 of them), my first thought was to create a database containing them all. I'm not really used to SQLite and Core Data, so I've got basically ...

How do I build a wiki into an iPhone app?

I want to build an iPhone app that is really a wrapper around a wiki. Specifically, I have some static reference content that can be represented by a hyperlinked set of pages and want to build an app that will provide a nice interface over this content, including search, bookmarking, and annotating. I'm wondering what the best approach i...

How to conditionally use static library only when linked

I'm doing an iPhone plugin project where I build a static library, let's call it lib1.a, which I provide to other programmers. When they link lib1.a into their project, they may also link lib2.a, which they build themselves based on a header file I give them. This header only contains a "hook" function which instantiates an obj-c object...

Why I get "implicit declaration of function 'PerformXMLXPathQuery'" warning?

Why I get "implicit declaration of function 'PerformXMLXPathQuery'" warning? NSString *response = [request responseString]; NSString* xPathQuery = [NSString stringWithFormat:@"//ExtendedData"]; NSArray* myArray = PerformXMLXPathQuery([response dataUsingEncoding:NSUTF8StringEncoding ],xPathQuery); ...

How do I find the frame of a UIView in the context of a UIScrollView?

Hi, I'm trying to place a UIPopoverController to display when a UIButton is tapped. However, the UIButton is placed within a UIScrollView and so its frame is offset by the scroll amount. Is there an easy way of finding out a view's frame as it appears in the context of the screen? Or do I just need to do a subtraction between the UIBut...

How to create such an iOS interface?

Would you please have a look at Tipulator app: http://www.sophiestication.com/tipulator/ I'm interested in the upper graphic part of the application, how to create such an interface? It doesn't look to use standard UIKit components, it looks like pure graphics yet the values can be updated as a UIKit component. ...

Find out if an NSDate is today, yesterday, tomorrow

With the iOS SDK I need to find an easy and secure way to see if an NSDate is today, yesterday, tomorrow. What I'm looking for is something like this in pseudo code: NSDate *myDate = someDate; if ([myDate isTomorrow]) { NSLog("Tomorrow"); } How would you solve it? ...

Game Center - orientation

Cocos2d version: v0.99.04 I'm adding Game Center to my current application and I found some code to open up the GKMatchmakerViewController. It seems to work well, except when it gets dismissed it changes the orientation in the simulator to portrait. The game only runs in landscape. I rotate the device back to landscape and all the cocos...

How to make a dragging UIView decelerating?

Hi all, I have a UIView that can be dragged with the finger which I've implemented by using a UIPanGestureRecognizer. This allows me to drag a view horizontally ; left or right. I make my view moving while receiving the following state from the UIPanGestureRecognizer (using the translationInView: method): UIGestureRecognizerStateBega...

How can I programmatically set the background color of a UILabel?

Hello. I'm diving into iOS development and I'm programmatically creating some labels, but I can't seem to set their background color to black. From what I read, it seems simple enough, here's my code... UILabel *lbl = [[[UILabel alloc] initWithFrame:CGRectMake(x, y, width, height] autorelease]; [[lbl layer] setBorderColor:[[UIColor bl...

UIView animation block not animation view's subviews...

I am unable to achieve any animation with the following code: if (self.segmentControl.selectedSegmentIndex == 0) { [UIView transitionFromView:tableView toView:mapView duration:1.0 options:UIViewAnimationTransitionFlipFromLeft completion:nil ...

Acess files with the same name in Sub-Subdirectories

First my structure: Application |---> dirA |---> dirB |---> index.html |---> somefile.js |---> dirC |---> index.html |---> somefile.js |---> dirD |---> index.html |---> somefile.js some problems here. i need to load the index.html of this different dirs in my webview. but ...

iOS keyboard click user preference

Can anyone tell me how I can discover if the user has enabled/disabled that annoying click when they type, I'd like to use that as a default to indicate whether I should make a click when they click something. Thanks, vic ...

Units in HTML for iPhone/iPad

What CSS measurement unit should I use for the dimensions (widths, heights, margins, paddings, fonts, etc.) of an embedded HTML resource that should run both on iPhone and iPad? Or should I use alternate CSS styles for iPhone/iPad instead? I would like the content of this resource to look well on both devices, without having two creat...

Several Custom UITableViewCells in one NIB - how to refer to in code?

I'm creating custom UITableViewCells using the approach outlined on this page: http://icodeblog.com/2009/05/24/custom-uitableviewcell-using-interface-builder/ So my cellForRowAtIndexPath code looks a bit like this: static NSString *CellIdentifier = @"CustomCell"; TableCellWithLogo *cell = (TableCellWithLogo *)[tableView dequeueReusabl...

iOS Core Data how can it leak?

Hello I was analyzing my app with leaks, and i observe that some core data entity is leaking, how can a NSManagedObject leak? I thought it was managed by the operating system? Are there known leaks in core data? The line that Leaks says causes the leak is NSMutableArray *e=[NSMutableArray arrayWithArray:[[user videos] allObjects]]; ...

How to check if iOS version supports library?

This question... http://stackoverflow.com/questions/3862933/check-ios-version-at-runtime ...received an answer explaining how to test if a class supports a method. (Over time, Apple may have added methods that the class, as presented in an old iOS, would not have. Rather than test for the iOS version, just test the class directly.) Ca...

iphone OS! RSA Encryption with public key generated by Bouncy Castle (Java)

Hi, I'm developing an application on iphone. I had an application on Java using encryption (RSA) and I created a Private Key and Public Key. I want use the Public Key in Java application on iphone. For Ex: My Public Key is byte[] publicKey = {0x01,0x02}; How can I use my publicKey to encrypt data on iphone? I saw CryptoExercise, but i ca...

how i can build app in 2g phone using 3gs frameworks

I am developing one application which need scanning component, I have application ready but when I build it in 2g phone with os version 3.1.3, application gives me error. I have weak linked those framework which are not in 2g. ERROR: Not Enough Frames In Stack Do advice thanks in advance. ...

Can I reposition an MKAnnotationView that's already been placed on a MKMapView?

Every few seconds I'm retrieving an updated lat and lon for a real-world object that is in motion. This object is represented on my MKMapView by an MKAnnotationView. Is it possible to smoothly animate the object's movement from coordinate to coordinate, rather than remove its current MKAnnotationView and add a new one at the new coordi...