This creates a simple scrollview. Define an IBOutlet in the .h file, and configure in Interface Builder the same size as it's container;
@synthesize stampsScrollView;
- (void)viewDidLoad {
[stampsScrollView setScrollEnabled:YES];
[stampsScrollView setContentSize:CGSizeMake(250.0, 800.0)];
Try the search, it's linked to some great forums
Sunday, June 12, 2011
Saturday, June 4, 2011
Simple check for a device feature (email in this case)
canSendMail is a class method (+) so therefore can be called on the class itself;
if ([mailClass canSendMail])
{
[self displayComposerSheet];
} else {
[self launchMailAppOnDevice];
}
Very strange error message w/Mail Composer
The following console listing from our new app using the MailComposer code -
Running…
[Switching to thread 11779]
[Switching to thread 11779]
Re-enabling shared library breakpoint 1
Re-enabling shared library breakpoint 2
continue
2011-06-03 18:43:37.897 PostCards[554:707] Backside of PostCard should display
2011-06-03 18:43:38.649 PostCards[554:707] This launches the email composer
2011-06-03 18:43:38.676 PostCards[554:707] The email composer should display
Sure would like to know what the DAAccountsLoading.lock is???
checking online forums ...............
Running…
[Switching to thread 11779]
[Switching to thread 11779]
Re-enabling shared library breakpoint 1
Re-enabling shared library breakpoint 2
continue
2011-06-03 18:43:37.897 PostCards[554:707] Backside of PostCard should display
2011-06-03 18:43:38.649 PostCards[554:707] This launches the email composer
2011-06-03 18:43:38.676 PostCards[554:707] The email composer should display
2011-06-03 18:43:45.801 PostCards[554:1603] DA|Could not open the lock file at /tmp/DAAccountsLoading.lock. We'll load the accounts anyway, but bad things may happen
[Switching to thread 13315]Sure would like to know what the DAAccountsLoading.lock is???
checking online forums ...............
Saturday, May 28, 2011
Simple UIImage transforms (scale & translate)
This snippet Moves and Scales an image. Both actions are combined with a concatenation (CGAffineTransformConcat) function
- (void)transformMoveNScale //performs a translation & scaling of the image
{
CGAffineTransform transformTranslate = CGAffineTransformMakeTranslation(-330.0, 15.0);
CGAffineTransform transformScale = CGAffineTransformMakeScale(0.5, 0.5);
CGAffineTransform transformImage = CGAffineTransformConcat(transformScale, transformTranslate);
[self.postCard setTransform:transformImage];
}
Wednesday, May 25, 2011
iPad in Landscape only
// Allows the program to only run in landscape
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) ||
(interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}
Subscribe to:
Posts (Atom)