Use stepper control in iphone to increment and decrements values in iphone .here i will explain you complete code and i will also give you complete source code here.
header file
devangViewControlle.h
output:
I hope you will be clear with this two files.
header file
devangViewControlle.h
#import <UIKit/UIKit.h>devangViewControlle.m
@interface devangViewController : UIViewController
@property (weak, nonatomic) IBOutlet UILabel *stepper_lbl;
- (IBAction)stepperchnaged:(id)sender;
@end
#import "devangViewController.h"
@interface devangViewController ()
@end
@implementation devangViewController
@synthesize stepper_lbl;
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
- (IBAction)stepperchnaged:(id)sender {
double value = [(UIStepper*)sender value];
[stepper_lbl setText:[NSString stringWithFormat:@"%d", (int)value]];
}
@end
output:
I hope you will be clear with this two files.
0 comments:
Post a Comment