objective-c

Is it possible to select a row in a **previous** UITableview

Hello all Is it possible to select a row in a previous UITableview. I provided image samples to get a more clear picture of what is happening exactly. http://img186.imageshack.us/img186/933/picture8a.png http://img405.imageshack.us/img405/9327/picture9d.png http://img200.imageshack.us/img200/5386/picture10thm.png At the morning w...

3D CAD Graphics Framework on OS X - Suggestions?

I am looking to implement a 3D model viewer in my application. The application uses a series of interlinked plug-in objects, with user attributes, to contribute to the 3D form. (Basically a parametric design tool). The plug-ins must communicate via a common, simple, protocol as they may also be user contributed and so I am looking for ...

How to store linear range of values? Which Data structure to choose?

I need a simple structure to store polygon names based on sides ... so for e.g. 1 side is "monogon", 2 sides is "digon", 3 sides is "triangle" and so on (say for upto 12 sides) What is the simplest way to store these and reuse them in the code dynamically? for e.g. if my polygonShape class has 3 as the number of sides, it should return "...

UISlider alpha issue

Hi! I'm want to figure out such an issue: I have a UIView dervied class in which there are several controls. Some of them must appear and disappear depending on selected mode. This is made by means of setting aplha value to respected component. All controls adds procedurally through code in initWithFrame in normal way. All controls wo...

Is it possible to push a navigationController as a subView of UIApplication

Hello, does anyone know if it's possible to push navigationController as a subView of UIApplication. For instance like this [[[UIApplication sharedApplication]keyWindow]addSubview:[self.navigationController pushViewController:rvController animated:YES]]; This doesn't work of course else I wouldn't have asked the question;). But s...

IPhone - After dismissing Modal View Controller - gap is left at top of page

When starting the app, if the user doesn't have login information stored, I want to display a modal view controller to force the entry of this information. I found through trial and error, that this had to occur in viewDidAppear of my root view controller. I tried to put it in viewDidLoad and viewWillAppear, but those didn't work unles...

How can I make a UITextView have a similar style to a UITextField and how do I get the damned thing to go away?

I can't understand this. Basically, I want the same style as a UITextField, but to be able to take a multiline string. I'm sure it's a frequently asked problem, but I can't find a readable solution anywhere on the web. Oh, and how can I make the damn keyboard go away when I touch out of it, or press a "Done" button (which doesn't seem t...

Does anyone have the UIViewAdditions file from WWDC 2009 session 128?

Hopefully without violating any NDA, here is my question: I have been reviewing the WWDC session on prototyping, and I've gotten stuck on whatever we weren't shown that is in the UIViewAdditions file. Can anyone point me in the right direction to find the code from that file? ...

iPhone app running in Instruments fails with unrecognized selector

I have an app that appears to run without problems in normal use. The Clang Static Analyzer reports no problems either. When I try to run it in Instruments, it fails with an unrecognized selector exception. The offending line is a simple property setter of the form: self.bar = baz; To figure out what's going on, I added an NSLog(...

Standard (netscape format) HTML Bookmarks Parser -> NSMutable Array of URLS and Names / Folders

Could any stackoverflower kindly point me to a quick snippet, algorithm, code to achieve that? Thaanks. ...

Drop Shadow on UITextField text

how is it possible to add a shadow to the text which is in a UITextField? ...

stretchableImageWithLeftCapWidth:topCapHeight doesn't work in initWithCoder: of UIImageView subclass

I have a UIImageView subclass called ShadowView, which displays a shadow that can be used under anything. ShadowViews are to be loaded from a nib. In initWithCoder:, I have the following code: - (id)initWithCoder:(NSCoder *)decoder { self = [super initWithCoder:decoder]; if (self != nil) { UIImage *shadowImage = [[UIImage ...

Managing subviews in Cocoa Touch

Hi, I'm developing an iPhone app. I need to create a Quiz application that has different Question views embedded in it (see my similar question). Different types of Question will have different behavior, so I plan to create a controller class for each type of Question. The MultipleChoiceQuestionController would set up a question and 3-...

Clear CATiledLayers Cache When Changing Images

I have a UIScrollView with a single subview, a UIView backed by a CATiledLayer. All is working well with one exception: when I change images from one to another the CATiledLayer caches the previous images zoom levels. Scrolling around then displays the old image for a split second before the updated image loads. Is there any way to t...

using JSON-Framework to prepare a json object to post via HTTP Request Objective-C

I am successfully using the json-framework to do GET HttpRequests. Does anyone have code to prepare a json object and do a POST HTTP Request? If so, can you please share some sample objective-c code. Thanks ...

How to get Emacs magic-mode-alist to match against string in middle of file

I'm a user of Aquamacs under OS X, which by default does not recognize .m files as Objective-C but instead treats them as matlab files - from the mailing list, the reason for this is that it was felt by the maintainer that he wanted a clean way to distinguish Obj-C files from others before he added a solution into the distribution. Thus...

Formatted absolute value of an NSNumber

Well, it's actually the sum of an array of NSDecimalNumbers I'd like to get the absolute value of... I constantly feel like I'm fighting the framework with all the conversions & typecasting that are required...from double to NSNumber to NSDecimalNumber and back and...all while trying to maintain the precision that NSDecimalNumber affords...

Why does this function return a pointer?

When I call this function, it seems to return a pointer instead of an int. When I try and NSLog the return value, I get a warning "passing argument 1 of NSLog from incompatible pointer type." And if the NSLog runs, it crashes. Does this have to do with this being a static method? How can I get back a real int? I am using SDK 3.0 Here...

Initialize a class only once

I have a class that contains a few instance methods which need to be called from another class. I know how to do that - TimeFormatter *myTimeFormatter = [[TimeFormatter alloc] init]; [myTimeFormatter formatTime:time]; However, I don't want to have to alloc and init TimeFormatter every time I need to call one of its methods. (I need t...

UIPageControl with UIView with button

I'm new to Objective-C and need help! I'm following the example "PageControl" which can be found on the net. I added a button to the view in the NIB and hooked up an action which the implementation is found below. Here is my definition for the view controller being displayed in the page control: //ContactCardViewController.h @interf...