I've figured out how to create a new UI element where I touch and add it using [self.view addSubview:[uilabel reference]]. However, if I tap in the same place, it'll simply add another subview on top of the current one.
I am able to create a unique key for each part of the grid I'm making (and thus placing subviews). Is there any way I ...
Hi,
I have a UIView, which contains a UIImageView subview. The subview fills the parent view frame. I am zooming the parent UIView from a point in the center of the screen, from a width and height of 0, 0 up to full size. The subview won't stretch to fill the parent. It just remains full size the whole way through.
I've tried various c...
Hi,
in my project both landscape and portrait orientation is supported, i have a controller view to be added as subview when tap on button.
My problem is if user keep device in Face Up orientation or faceDown Orientation and press button weather i have place subview in portrait or landscape mode...?
Thanks in advance
...
Can someone just clarify how UIView works in this context? Is it just part of the view controller (i.e. the view that is part of my ViewController.xib). I was puzzled for a second as it felt like I should have been declaring it somewhere, I wanted to call beginAnimations but was not sure what to call it on.
@implementation ViewControlle...
How can I get whats been selected in a segmented control?
...
I have a UINavigationController with a UITableViewController which has and two UIBarButtonItems:
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.leftBarButtonItem = self.editButtonItem;
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd targ...
I'm in the process of making a simple drawing program for the iPhone. At the moment, touch events add their location to a list which is connected with a bunch of CGContextAddLineToPoint calls which are redrawn in every call to drawRect.
I'm running into performance issues at fairly low numbers of lines (they are transparent, though), s...
Hi all,
Can someone please point me in the right direction... I need to use the same sound (a button press) throughout all view controllers in my app. What is the best way to do this. I have managed to load and play a sound in a single view controller but cannot manage to pass a sound to different viewcontrollers because SystemSoundID i...
How can i get a plain basic dialogue box in cocoa touch.seems so simple but I can figure it out...
Thanks!
...
How are the user's touches detected if i were to use UILabels that are overlayed on each picker component? I understand how to detect the user's touches on the picker, but I need to update the text of the label after the user make changes a picker component value. My method is not being called after I change the values in the picker comp...
I have this code trying to run a video on the iPhone 4 Simulator.
The problem is that looks like it loads the player but half a second later loads a back screen on top of the whole application disabling touch and everything, and it looks like it does not play the video also, because I can't hear anything.
Any ideas?!
MPMoviePlayerView...
My app loads webpages off the internet using a UIWebView. However I'd like to modify the experience so the user won't perceive it to be a webpage. What are some of the things I can do? and how to do it?
examples:
- Show the page when everything is loaded?
- Fade in effect?
Suggestions please.
...
I have a UITextView for text editing. By default, it has a small margin around the text. I want to increase that margin by a few pixels.
The contentInset property gives me margins, but it does not change the text "wrap width". The text is wrapped at the same width, and the extra "margin" just causes the view to scroll horizontally.
...
- (void)viewDidLoad
{
[super viewDidLoad];
page = 2;
NSString *pathToPdfDoc = [[NSBundle mainBundle] pathForResource:@"2010_07" ofType:@"pdf"];
NSURL *pdfUrl = [NSURL fileURLWithPath:pathToPdfDoc];
myDocumentRef = CGPDFDocumentCreateWithURL((CFURLRef)pdfUrl);
CGRect pageRect = CGRectIntegral(CGPDFPageG...
In an iPhone app I'm developing, I grab a set of data from a web service, store it in a mutable array for showing in a table, and also store it in core data as backup when there is no network.
My array is initialized in application:didFinishLaunchingWithOptions: as follows
tableArray = [[NSMutableArray alloc] initWithCapacity:100];
the ...
I need help with making a UIImageView float on the screen and when it hits the walls it bounces off like collision detection..
I havent gotten further than making the imageview. I need some help..
Any help? Thanks!
...
I want to display a image at random places on the screen. My idea is to generate two random numbers one being a x-value or a y-value and then passing it into a method which displays the image on the xy coordinates provided.
But, I dont know how to accomplish that so I need some help with coordinates...Also if you know a better way to ac...
I would like to use BWOrderedManagedObject to store an array of ordered objects in Core Data, using NSFetchedResultsController for displaying the data.
However, all of BWOrderedManagedObject's methods seem to simply return an array of ordered objects; NSFetchedResultsController requires an NSFetchRequest, and the only way to sort an NSF...
I have a UIWebView that loads up some html. In it is an img tag, I am saving an image in the app documents folder and I want to display that image within the html, I do so like this
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory , NSUserDomainMask, YES);
NSString *documentsDir = [paths objectAtIndex:0];...
I have connected the two methods below to separate buttons in my UI but have noticed that after pressing the "VERSION 1" button that I could not press the button again until the animation duration within the method had ended. My understanding was that the animation uses its own thread so as not to block the main application.
// VERSION ...