I am trying to manage the activity indicator from my App Delegate, that way any of my views can put the indicator up. So, I am adding it as a subview to 'window' and start/stop as follows:
- (void)didStartActivity
{
if( activityIndicator == nil ) {
activityIndicator = [[UIActivityIndicatorView alloc] initWithActivityIndicat...
hi iam creating an UIActionSheet with 2 buttons . now i want two each buttons do separate work .
how can i declare my 2 buttons on the :
- (void)actionSheet:(UIActionSheet *)menu
didDismissWithButtonIndex:(NSInteger)buttonIndex
i use this code :
if (buttonIndex != [menu cancelButtonIndex]) {
// do somthing...
i have a UIImageView displayed in my view with an image "image1" already set.
I have a button below it.
During runtime i would like the image to change to "image 2" when the button is pressed and upon release i would like the image to display "image1" again
1) I know that i have to give the UIImage a label or something so that i can a...
The UIImageView is placed in interface builder.
I already created an IBOutlet.
How do i programmatically change the UIImageView to view another image.
Can someone please help me?
...
Hi,
In winforms/C# most all UI Controls have a .Tag tag, so like myButton.Tag = myObject; where the Tag property is an 'object' type so you can basically store any type of object. How might I accomplish this in Objective-C/Cocoa? do all UI elements have something like .Tag where I can store an NSObject or something? If so, can you pleas...
I have an application that displays some graphics based on the properties of an object. I want that the state of that object to persist when the application is started next. I know that the app delegate has a "applicationwillterminate" function which I can use, but the problem is I have no idea how to get a hold of a pointer to the objec...
On the iPhone, in the Calendar App when you press the "Delete Event" button a confirmation slides in from the bottom. Does anyone know of any example code for this, or is it just a short view presented modally with a custom background?
If this is made using a custom view, do you know where I can get a background graphic the same as the ...
Is anyone aware of a version of the iPhone UISlider control with two thumbs? I need a control that will allow specifying a range of values. The UISlider API docs would imply this isn't possible with the standard control, so I was wondering if anyone had a solution for this (or had solved it themselves).
...
There are two views:
viewA and viewB. Both are rotated.
The coordinate system for rotation is weird: It goes from 0 to 179,999999 or -179,99999 degrees. So essentially 179,99999 and -179,99999 are very close together!
I want to calculate how much degrees or radians are between these rotations.
For example:
viewA is rotated at 20 de...
Okay, this seems like it should be relatively simple, but I've been Googling for the better part of an hour, and can't seem to find what I need.
I have a view controller that has a few different parts: a background view, a header view, and a few buttons. Now, I want the header and buttons to autorotate properly (they do, when I return Y...
Imagine a table ("StyleGrouped") with multiple sections:
Some sections should have a "regular header title".
There should be some buttons, between the "regular sections".
Intuitively, in order to define the section titles, I would use:
(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
And ...
Guys,
I am a kinna new to iphone app programming ... i have a UITTabBarcontroller and have 5 UITableViewControllers inside it.
Everything works fine ... I can change the tab using code ... but from the GUI when i click on different tabs, it wont change ....
have tried a lot ... please help me out here
thnk u ppl
...
I have an iPhone app that displays a modal view controller. The modal view controller shows two instances of a custom subclass of UITextView called RoundedTextView, an MKMapView, and a UIToolbar. I construct the viewController only once, and reset its data and present it each time the user summons it.
When showing this view controller w...
I created a UIView xib in Interface Builder and tried everything I could to indicate that the UIView should center itself, anchor itself at center, orient itself in central coordinates, etc. etc.
But whenever I add it as a subview in code, I also have to programmatically set its frame up with CGRectMake() or else it will always add to t...
For an application I'm working on, I'd like to implement sort of a gauge-like control. The gauge should be of vertical orientation and I'd like to get the effect of a dial with the values printed on it to move vertically so that the current value appears at the center of the gauge. While the part of the dial that is not currently visible...
Is there a way to invoke TouchesBegan, TouchesMoved, TouchedEnded programmatically ??
...
I have the following code to determine if a touch is within an image view in my table cell. However, it doesn't work. I compared the two with CGRectContainsPoint however, it doesn't work. Here is the code:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
// Declare the touch and get it's location
UITouch ...
Hi,
currently I'm doing
self.navigationItem.titleView = [[[UIImageView alloc] initWithImage:image] autorelease];
to set an image in the navigation bar. This way it is centered automatically.
Is there any way to have it left aligned ?
...
Here's what I have:
A MainWindow.xib file configured with one UIViewController (subclassed to RootViewController). This nib gets loaded at application launch.
RootViewController has two ivars, a custom subclass of UIViewController and a UINavigationController. Both of these are loaded from nibs.
When the application launches both i...
I'm trying to place a UILabel directly in the middle of a UITableViewCell vertically. Essentially I'm doing something such as:
float yPos = self.contentView.center.y;
I then assign yPos to my UILabel and add it as a subview of self.contentView within my UITableView subclass.
This still doesn't appear to be smack in the middle of the c...