objective-c

removefromsuperview just gives error

Hello all. I have a paginating scrollview with UIImageView's inside. At a point i need to remove some Imageviews to avoid memory-problems. But at any point i just get a BAD_ACCESS . for(UIView *subview in [scrollView subviews]) { if([subview isKindOfClass:[UIImageView class]]) { if ( ([subview tag] != ActualPage) && ([subview ta...

multi-section UITableView issues

Hi, I have an UITableView that contains 3 NSArrays and 3 NSDictionaries for each array. - (void)viewDidLoad { [super viewDidLoad]; contentArray = [[NSMutableArray alloc] init]; self.settingsArray = [NSArray arrayWithObjects:@"Settings", nil]; NSDictionary *settingsDict = [NSDictionary dictionaryWithObject:settings...

Refresh tableView \ View

I have tab bar application and when i press on one of the tabs the ViewDidLoad called now if i moving to another tab and then return to the previous one the VewDidLoad didnt call how can i know that this window load again? and also how can i refresh a view? for example a viewtable that i made logic changes and want to refresh the new da...

difference between nil and released object

Hi guys, I'm new to Objective-C and and I can't understand this. I know that I can send a message to nil (it's so hyped about feature of Objective-C), but I can't send a message to released object, getting an exception in this case, what the difference between them? ...

add UIButtons to UINavigationController?

I have a splitViewController and I would like to add a couple of buttons to the navigation bar for certain details views - is this possible? Looking at the API I only see a leftNavbarItem and a rightNavBarItem. ...

sending and receiving data with a server for an iphone app

I would like to allow my users to see other users data. I am thinking in terms of a game. I would like the users game on their phone to connect to an online score list , and store the lowest score on the list. Then if the user scores above, their score gets put into the list and stored. What does this involve exactly? Will this need e...

Is it possible to implement mutliple NSUndoManager for one NSWindow?

Hi, I have a window with multiple views (they all subclass NSView and there is always only one visible) on which i draw paths. I'd like to have an NSUndoManager for each view, but obviously they all have the same NSUndoManager, coming from the NSWindow. Is this even possible? Thx xonic ...

Can I load a big image ?

Hello, I was wondering what is the biggest image size I can use as background in a UIVIEW. I have an image of size 320 by 1700 which is scrollable and was wondering if this is going to be an issue loading it to the heap mem. Cheers. ...

Launch an app that doesn't have main window in Mac OS X.

As explained at this site, I could launch an app from Safari. I need to open an app that does some work behind the curtain, so I want an app that doesn't have a main window. Q : How can I make an app that doesn't have a main window or that doesn't show any window? ...

Sending UDP packets on iPhone fails over a fresh new 3G connection, but works otherwise

I'm having a strange problem when sending UDP packets from an iPhone over a 3G. Almost every time my application starts after a longer period of network inactivity (for instance after the phone comes from the sleep mode or it just gets a 3G connection), my application is not able to send any UDP packets. I get a kCFSocketError error stat...

Using CLLOcationManager and MKReverseGeocoder to get the name of the city.

I am trying to get the name of the city of user's current location by using MKReverseGeoCoder but it has some errors which i cannot recognize. Here are the details: It has some errors which i cannot recognize Undefined symbols: ".objc_class_name_CLLocationManager", referenced from: literal-pointer@__OBJC@__cls_refs@CLLocationMa...

Launching App using 'launchedTaskWithLaunchPath' Cocoa/objecive-c API.

I need to launch 'TextMate' from an App, and I used the following code. [NSTask launchedTaskWithLaunchPath:@"/Applications/TextMate.app" arguments:[NSArray arrayWithObjects:@"hello.txt", nil]]; But, I got the following error return. *** NSTask: Task create for path '/Applications/TextMate.app' failed: 22, "Invalid argument". Termin...

Why doesn't [obj selectorNotDefined] cause a warning?

I want that something like this: [myObject selectorNotDefined]; will cause a warning. Is there an option to make this happen? To be more specific, when I add this code to my existing project: NSObject *myObject = [[NSObject alloc] init]; [myObject selectorNotDefined]; The compiler will not invoke any warning. If I create a new pr...

How do I set the height of a toolbar in objective C?

I have this code in my applicationDidFinishLaunching: navController.toolbarHidden = NO; [navController toolbar].tintColor = [UIColor darkGrayColor]; [[navController toolbar] setFrame:CGRectMake(0.0,0.0,320.0,180.0)]; The first two lines definitely have an effect on the UI. For example, if I set toolbarHidden to YES, it is certainly h...

In Objective C why are my core data objects never being deallocated?

I am having a lot of trouble getting m core data objects to be deallocated. I even tried the simplest test I could think of and I watched the retain count and it always seems to be higher than I expect. I also put a breakpoint on the dealloc routine for the core data objects and it doesn't seem to get called (at least not unless I specif...

Accessing UIViewController from UITableViewController?

In iOS4, I want to use MPMoviePlayerController. I have a UIViewController that I pass to a custom class that manages MPMoviePlayerController. That plays video fine. I have another view that is a UITableViewController. Passing the UITableViewController to my UIViewController property on the video class doesn't work. I just get soun...

Remove rows from tableview based on IBAction

I have a segmented control on the top of a tableView that I would like to change the data that is loaded into the table. The segmented control has a button for day, week, month, year. If you click on one of the buttons it should only display that table data for the appropriate time period. This works fine right now when I move across t...

Cocoa Touch: How To Change UIView's Border Color And Thickness?

I saw in the inspector that I can change the background color, but I'd like to also change the border color and thickness, is this possible? Thanks ...

Detect when UITableViewCell goes out of scope

How can I detect when a UITableViewCell derived object gets removed from a table and into the cache? ...

Why doesn't this for loop execute?

I have a picker view controller to select a chemical source and possibly a concentration. If the source doesn't have concentrations, it just presents a single picker. It gets populated by an NSDictionary with source type names as keys and a custom model object I made called Chemical that has four properties, two NSString, one float and...