objective-c

How to "Skin" an application on Mac?

I want to skin an application I wrote, but do not know where to start. Is there anything like DirectShow (stardock.com), DotNetBar etc..for Mac that I can do this? (I do know these examples are for .NET, just using a point of reference. If there is not, is there some source of information that will lead me in the right direction? A...

Problem with the Custom buttons when it is disabled.

Hi Guy's I need a help from your side.Actually I am having a Custom button say(button1) to which I am adding an image and another custom button deleteButton as a subviews.There is button action for button1 and deleteButton.My problrm is I had an edit button.by default I am not showing the delete button when I click the edit button then ...

How can I get the monday of a week in a special date in Objective-C?

e.g. 01.10.2010 is friday => 27.09.2010 is monday. I have no idea how to manage this one. btw: how can I calculate with dates? ...

How to show multiple Alerts one after another in iphone app

Hi let me explain briefly. i am developing an iphone application where i have to show multiple UIAlerts one after the another, but if i simply use multiple [alert show]; they all show up stacking up to each other. one solution is to show one alert [alert1 show]; then in - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex...

NSURLConnection and NSData leaking memory

Hello All, So I was wondering if this was a common problem to be leaking memory using NSData to store a connection reponse data. For example, I have this line to initialize my data object davData = [[NSMutableData data] retain]; And then when the connection errors or finishes loading, I release it. From my understanding, that shoul...

Error messages when using OpenGL ES template

I made a new OpenGL ES application, and without modifying anything, I ran the program. It runs, but I see these error messages: Detected an attempt to call a symbol in system libraries that is not present on the iPhone: open$UNIX2003 called from function _ZN4llvm12MemoryBuffer7getFileEPKcPSsx in image libLLVMContainer.dylib. Detected an...

UIScrollView inside a UITableView won't show/hide correctly (Xcode iPhone)

I've used Interface Builder to drop a UIScrollView into the top of a UITableView. (To do some horizontal scrolling.) In code, I now wish to selectively show/hide that UIScrollView. I've connected it in IB, and then execute various combinations of code... but the area never disappears. self.scrView.hidden = TRUE; or: CGRect aFrame ...

How do I check if the iPod supports audio recording?

How do I check if the iPod supports audio recording using Cocoa API? ...

Remove duplicates nsmutableArray

I am currently removing this way: [Refs setArray:[[NSSet setWithArray:Refs] allObjects]]; However i wish to keep the order of the array before the removeduplicates Any tips ? Thanks ...

How to display an image on a MKOverlayView?

UPDATE: I'm still struggeling with this problem, although I may have some leads. Maybe it has something to do in what way the images are projected on the MKMapView, Google Maps uses the Mercator projection to project it's images onto a map. If you compare the above image to that of the previous uploaded images, then it looks like t...

UITableView performance issue

Hi all, I have a UITableView which gets data from a server and updates in every 1 second(using performSelectorOnMainThread). Since this blocks main thread sometimes its not easy to scroll the table and its painfull for the user. Also i cant reduce my refresh interval also. What are the possible solutions for this problem? ...

NSClassFromString works for string literals, returns nil for constructed strings

I am trying to create an instance of a type based on another type passed into a method. I find that NSClassFromString works just fine if used with a string literal, as in id instance = [[NSClassFromString(@"TheNameOfTheClassIWant") alloc] init]; but if I construct the string with something like NSString *inClassName = [[protoInstance...

colorWithPatternImage and setCornerRadius issue

Hello I'd like to achieve at the same time rounded corners and a background composed by tiling a little png (OPERATOR_VIEW_BACKGROUND_IMAGE). My main goal is to allow a designer to fill the background of a View by inserting the right image in the project resources. [triggerView setFrame:CGRectMake(0, 0, ICONS_WIDTH, iconFrameHeight)]; [...

NSCoding protocol question

I want to add the archiving (NSCoding) protocol to my model class, and then i implement both methods encodeWithCoder:(NSCoder*)coder and initWithCoder:(NSCoder*)coder. MyModelClass has 2 instance variables (NSString and NSImage), so i use the encodeObject:(id)object forKey:(NSString*)string method to encode the object plus the value for ...

Does the leaks tool in Instruments give false positives?

I have autoreleased objects that I am assigning to synthesized (retain) properties on an object but it is marking them as leaked. Does leaks just sometimes have false positives or am I missing something? ...

Setting twitter status from iPhone not loading

Hi, I'm trying to call -(void)shareOnTwitter:(NSString *)link{ link = [NSString stringWithFormat:@"http://m.twitter.com/?status=%@",link]; //load webView etc But twitter is taking me to the logon page without my link saved. Has anyone gotten this to work? ...

Horizontal Scrolling UITableView - Caveats?

Would it be as simple as applying a rotation transform? I'm willing to manage the content of my cells with a rotation transform. ...

What's the best way to get a bool value from a detailViewController?

In my navigation based app, there is a button that if pressed, will change the view to a detailViewController. Here the user can set several options. One of those options is a bool value. When I return from the detailViewController how can I see what this bool value is? ...

How to intercept long press on UITextView?

Total Objective-C / Cocoa Touch noob here, beware. I'm trying to intercept when a user long presses on a UITextView (a magnifying glass then appears with the caret positioner) and then releases the touch, i.e. when normally the "Select" and "Select All" Options appear, after the magnifying glass. I want to replace this with my own custo...

UIScrollView only works in landscape

Hello- Trying to get up to speed on UIScrollView for an app that I'm working on. Found a tutorial at http://www.tckdeveloper.com/Tutorials/iPhone/ScrollViews.html that helped out and that got the scroll view working in landscape mode. Started adding more content to the view so that scrolling was needed in the portrait view as well. When...