Update: iPhone SDk 3.0 now addresses the question here, however the NDA prevents any in depth discussion. Log in to the iPhone Dev Center if you need more info.
Ok, I have to admit I'm a little lost here.
I am fairly comfortable with Cocoa, but am having trouble picking up the bit of javascript needed to solve this problem.
I am try...
I have a project that compiles with some warnings. It's an iPhone project that uses some methods on NSDate, that are seemingly not the headers of the iPhone SDK, but work flawlessly none the less. When I call these methods I get warnings like:
So how do I silence the warnings permanently, in order to tell XCode "it's OK, really."
O...
How can I display a splash screen for a longer period of time than the default time on an iPhone?
...
If I declare a string constant like so:
You should create a header file like
// Constants.h
extern NSString * const MyFirstConstant;
extern NSString * const MySecondConstant;
//etc.
You can include this file in each file that uses the constants or in the pre-compiled header for the project.
You define these constants in a .m file li...
I have a block of code which is similar to the following:
for (NSDictionary *tmp in aCollection) {
if ([[bar valueForKey:@"id"] isEqualToString:[tmp valueForKey:@"id"]])
{
break;
}
else
{
[aCollection addObject:bar];
}
}
Is this technically an exception in Objective-C 2.0? It appears you cannot mutat...
Hello all -
How can I use two separate CABasicAnimations to simultaneously animate the same property?
For example Two CABasicAnimations, both animate position.y.
The first animation will be a bounce (from 100, to 300, duration = 1, autoreverse = yes, repeatcount = 10)
The second animation will be a slow scroll (by 100, duration = 10)...
Is it possible to cancel a UIView animation while it is in progress? Or would I have to drop to the CA level?
i.e. I've done something like this (maybe setting an end animation action too):
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:duration];
[UIView setAnimationCurve: UIViewAnimationCurveLinear];
// other...
How do I execute a method in my ViewController every x milliseconds?
...
I have a UIViewController that allows me to view and edit information of a class.
It is only allocated once but it's number of rows,sections and data is passed to it depending on the value the user selected.
For example. Here it is editing a name & type property (Header view of table is too big.. I did this so you will see the weirdne...
Curious, how does an NSMutableArray mutate into a type of UIButtonContent? I'm currently working with an instance variable of type NSMutableArray which crashes upon receiving an error with:
*** -[UIButtonContent count]: unrecognized selector sent to instance 0x393ed0
Wasn't even aware of UIButtonContent, so not explicitly working with ...
I have a modal view controller that I put onto screen using presentModalViewController:animated. This particular view controller, an instance of UIViewController, has a UITableView and cells with further detailAccessory options. Clicking on a date row should allow a controller with UIDatePicker to populate on the screen. The problem is t...
Hello and thanks for giving this question a gander.
It seems that PNG files that I drag/drop into IB do not display in the same manner that they are shown in the iPhone simulator. What gives? For example, if I want to drop in a PNG with rounded corners, IB shows hard rectangular corners but when I build to the simulator, I see the roun...
Here is my setup: one navigation controller, two views
The first view, the rootview, displays the statusbar and navigation bar (portrait view).
When the rootviewController senses rotation, it hides the nav bar and status bar and then it pushes view 2 onto the navigation controller (in landscape now).
This part works as expected.
When ...
I have UIButton on the main view, when the button is clicked I add a UIImageView to the whole screen filling up the screen (this is added on top of the button).
What happens is that by clicking on the UIImageView's image (at the location where the UIButton is) it launches the UIButton click. However, since the button is invisible to th...
Hi, i'm having a couple of problems when i try to alloc a UITextView on an AlertView.
Here is my code:
UIAlertView* minhaCritica = [UIAlertView new];
minhaCritica.title = @"7Arte";
[minhaCritica addButtonWithTitle:@"Cancelar"];
[minhaCritica addButtonWithTitle:@"Enviar"];
minhaCritica.message = @"Escreve a tua crítica:\n\n\n\n";
minhaCr...
I'm trying to programatically select/change the tab of the UITabViewController.
I tried doing it via:
self.tabBarController.selectedIndex = 2;
This looks to be the way that I should do it, but it doesn't work. I thought that maybe the self.tabBarController returns a read only object (I sorta remember reading that somewhere), but I'm ...
Is it possible to extend the interface builder's attribute inspector with additional attributes for custom classes inheriting from UIView?
...
Ok I understand that this error mostly comes from sending a method call or trying to access a variable that has already been deallocated.
Here is the problem:
.h
@interface TimeEntry : NSObject <NSCopying, NSCoding> {
NSDate *from;
NSDate *to;
NSString *information;
}
@property (nonatomic, retain) NSDate *from;
@property (nonatomi...
I am trying to design a feature in my application for the iPhone that simulates the Springboard feature (Main menu of the iPhone that allows you to view more apps), or the way Weather application works that allows you to flip between views.
Does anyone have any samples of this how I would go about doing this. It's seems very trivial bu...
I want to be able to call an object's method on a new thread; but, I am confused about how to manage retain counts (or even if it is an issue).
In a non-threaded scenario, I would do this:
MyObject *newObject = [[MyObject alloc] init];
[newObject doSomething];
[newObject release];
In this scenario, everything's fine. However, my ques...