change attribute > actor > color > red to 100
change attribute > actor > color > green to 100
change attribute > actor > colour > blue to 200
change attribute > actor > color > alpha to 100
Incoming search terms:
- change color actor gamesalad
let us make technology work for you
change attribute > actor > color > red to 100
change attribute > actor > color > green to 100
change attribute > actor > colour > blue to 200
change attribute > actor > color > alpha to 100
Make 2 rules
1) when touch is pressed
change attribute self.dead to true
then another rule
2) if attribute self.dead = true
destroy
Make 2 rules
1) when touch on first actor
change attribute game.dead to true
then add the rule for second actor to be destroy
2) if attribute game.dead = true
destroy
The easiest way is to check the Prerendered check box on your target’s Summary tab.
Add the following macros
|
1 |
#define IOS_OLDER_THAN_6 ( [ [ [ UIDevice currentDevice ] systemVersion ] floatValue ] = 6.0 ) |
Then add following code to your viewcontroller class’s .m file
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
#ifdef IOS_OLDER_THAN_6 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation{ return (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft); } #endif #ifdef IOS_NEWER_OR_EQUAL_TO_6 -(BOOL)shouldAutorotate { return YES; } - (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscapeLeft; } #endif |
Use the following lines of for using custom images as the cell background for a UITableView
- (UITableViewCell *)tableView:(UITableView *)tableview cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @”Cell”;
UITableViewCell *cell = [tableview dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier];
}
UIImageView *bgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tableCellBg.png"]];
[cell setSelectedBackgroundView:bgView];
cell.textLabel.text = @”name”;
cell.textLabel.textColor = [UIColor blackColor];
[cell.textLabel setFont:[UIFont fontWithName:@"Arial-BoldMT" size:18.0]];
return cell;
}
You can remove the background view of a UISearchBar by adding following line of code
for (UIView *subview in searchBar.subviews) {
if ([subview isKindOfClass:NSClassFromString(@"UISearchBarBackground")]) {
//[subview setAlpha:0.5];
[subview removeFromSuperview];
}
}
Add the following lines of code
UITapGestureRecognizer *tgr = [[UITapGestureRecognizer alloc]
initWithTarget:self action:@selector(handleGesture:)];
tgr.numberOfTapsRequired = 1;
tgr.numberOfTouchesRequired = 1;
[imgView addGestureRecognizer:tgr];
and the target functions is
- (void)handleGesture:(UIGestureRecognizer *)gestureRecognizer
{
if (gestureRecognizer.state != UIGestureRecognizerStateEnded)
return;
//your code here…
}
You can use custom background image for UIToolBar by the following method
[[UIDevice currentDevice] systemVersion];
if ([[[UIDevice currentDevice] systemVersion] floatValue] > 4.9) {
//iOS 5
UIImage *toolBarIMG = [UIImage imageNamed: @"toolbar.png"];
if ([toolBar respondsToSelector:@selector(setBackgroundImage:forToolbarPosition:barMetrics:)]) {
[toolBar setBackgroundImage:toolBarIMG forToolbarPosition:0 barMetrics:0];
}
} else {
//iOS 4
[toolBar insertSubview:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"toolbar.png"]] atIndex:0];
}
You can use custom background image for UINavigationBar by the following method
[[UIDevice currentDevice] systemVersion];
if ([[[UIDevice currentDevice] systemVersion] floatValue] > 4.9) {
//iOS 5
[navigationBar setBackgroundImage:[UIImage imageNamed: @"navImg.png"] forBarMetrics:UIBarMetricsDefault];
} else {
//iOS 4
[navigationBar insertSubview:[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"navImg.png"]] atIndex:0];
}