Author Archive

Change the color of an actor in gamesalad

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

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

Incoming search terms:

  • how to make an actor destroy when actor is touched in gamesalad

Disable glossy effect of the iOS app icon

The easiest way is to check the Prerendered check box on your target’s Summary tab.

Add the following macros

Then add following code to your viewcontroller class’s .m file

Incoming search terms:

  • Xcode 3 2 6 Landscape shouldAutorotateToInterfaceOrientation

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;
}

Incoming search terms:

  • using uitableview as landing page

Remove Background view of UISearchBar

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];
}
}

Incoming search terms:

  • code for how to remove uisearchbar in iphone

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…
}

Incoming search terms:

  • add gesture recognizer programmatically
  • add tap gesture recognizer programmatically
  • gesturerecognizer on imageview ios
  • ios add gesture recognizer programmatically
  • programmatically add gesture recognizer
  • programmatically add sound when gesture is given
  • programmatically tap gesture to view ios

Use Custom Background Image for UIToolBar

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];

}

Incoming search terms:

  • android custom toolbar background
  • uitoolbar background image ios 6
  • uitoolbar photoshop

Change the background image of UINavigationBar

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];
}

Incoming search terms:

  • iOS development change the wallpaper
  • iphone update UINavigationBar background image
Page 1 of 2012345...1020...Last »