cocoa-touch

MVC Model Implementation?

I am creating a simple application using the MVC design pattern where my model accesses data off the web and makes it available to my controllers for subsequent display. After a little research I have decided that one method would be to implement my model as a singleton so that I can access it as a shared instance from any of my contr...

Missing Core Data Notifications

I'm trying a multithreaded Core Data implementation on iPhone SDK 3.1.3. I have two different NSManagedObjectContext objects for each thread and I am registering for the change notifications on one thread like below: - (void)setup { DLog(@"Registering for NSManagedObjectContext notifications"); NSNotificationCenter *nc = [NSNoti...

UIScrollView with UIWebViews

There seem to be many questions asked about this subject here on stackoverflow, but none of them touch on the updates made in 3.0. After mucking around for hours on end I finally found out, that nested scroll views (in my case web views inside a scroll view) are fully supported, however the example given at http://developer.apple.com/iph...

Resources check

hey I am frequently uploading my XCode iPhone projects to an svn repository to be build on another machine. My problem is that when I add resources to my project sometimes I forget to add the resource as relative to the project. I know one answer is to be more careful (not easy when your tired!) but if there was a way to run a script t...

Adwhirl is Not working in the UIViewController Class

If i implement it in application delegate class then it works fine. But in Viewcontroller class crash every time. i implemented try-catch then it will not crash. but not working. Thanks Manoj ...

What's wrong with this method?

I'm getting a warning: "Return makes pointer from integer without a cast" for this method... +(BOOL *)getBoolFromString:(NSString *)boolStr { if(boolStr == @"true" || boolStr == @"1"){ return YES; } return NO; } ...

accessing video preview data with iPhone SDK 3.1.2/3

Is there a way to access raw data of iphone camera preview? I mean not the data of the picture that was shot already, but the preview, that shows before taking a shot? TIA ...

how to save Image to Photos in iPhone without losing quality ?

the quality of saved image will lose when i'm using this method ... UIImage *img=imageview1.image; UIImageWriteToSavedPhotosAlbum(img,nil,nil,nil); ...

Best way to set default tint for UINavigationController

I use a lot of UINavigationControllers in my app. I am using a UIColor to set the tintcolor of the navigationBar. This works as expected, but I am trying to find an easy way to set a default tintcolor for all UINavigationControllers. What is the best way to do this? Is it subclassing the UINavigationController, or is there something ...

continueTrackingWithTouch: withEvent: not being called continuously.

I have a very simply subclass of UIButton that will fire off a custom event when the button has been held for 2 seconds. To accomplish this, I overrode: // // Mouse tracking // - (BOOL)beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event { [super beginTrackingWithTouch:touch withEvent:event]; ...

Sub-viewController doesn't get autorotation notifications, bug?

If I have a view (and its controller) and I override the willAnimateRotationToInterfaceOrientation method so I can respond to autorotation events everything works fine and dandy. Now if I create another viewController and add its view to the first viewController's view via: [firstViewController.view addSubview:secondViewController.view...

Cell Dequeue problem when table inside another table's cell content view

I am using two table views (Main Table and Sub Table), one table inside other's cell. I am adding Sub Table in Main Table's cell content view. I am also using different Cell Identifier for both table cells. Now, issue is : When - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath is ca...

Getting Carrier name in Cocoa Touch app

Hi, Is there a way to get the name of the current carrier of the phone inside a Cocoa Touch application? ...

correct use of core data for multiple access to the data - iphone/ipad

Hi everyone I got a question ;) Actually I want to use core-data in different threads. I have two UIviews that display data from the same table in the database. If a remove an entry in the first view I'm supposed save and then ask the PersistentStoreCoordinator to give me (the UIview) a brain new managed object. That what they say in ...

Differing NSNumberFormatter behavior

Consider this code: NSNumberFormatter *nf = [[NSNumberFormatter alloc] init]; nf.numberStyle = NSNumberFormatterCurrencyStyle; NSLocale *l = [[NSLocale alloc] initWithLocaleIdentifier:@"it_IT"]; nf.locale = l; [l release]; nf.decimalSeparator = @","; nf.currencySymbol = @"US$"; [nf setLenient:YES]; NSString *s = @"US$ 0,05"; double d =...

Cocoa Touch : A method each time view is shown?

hi, there is a method called viewDidLoad that execute a code when the view is loaded is there a method that do the samething but each time the view is shown? ...

CoreData INSERT or REPLACE ?

Hello, I'am currently migrating an iphone application using SQLite to CoreData. I need to do an INSERT or REPLACE to add only the new content, is there a way to do this or do I have to fetch all the DB and look for existing objects and add the new ones ? Thanks. ...

Speeding up full screen image drawing on iPhone 3G

Hello all. I am developing an app which plays interactive real time streaming video. I use FFMPEG (don't worry, I'll be releasing my source code) to decode a MPEG2/H264 RTP stream. I simply cannot get the iPhone 3G to draw a screen full of pixels faster than 5 times per second. I've tried a OpenGL texture which was just a slow. I've...

I can't use dashes in XPATH on iphone using libxml2

I'm trying to parse HTML data using KissXML for iphone. I've noticed that I can't have dashes in the id() tag, otherwise it won't evaluate. For example, if I'm trying to get the element at I would do id("foo") However, if I try to get at element , and I try id("foo-bar") the libxml2 XPATH engine doesn't seem to return anything. It w...

iphone - passing an object on an UIToolbarButton action

Is that possible to make a UIToolbarButton pass an object to its target by using some exoteric method (as it seems not to be possible using regular button use)? I mean something like UIBarButtonItem *Button = [[UIBarButtonItem alloc] initWithImage:buttonImage style:UIBarButtonItemStylePlain target:self action:@selector(doSomething:) ...