Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RadixViewController.h
- #import <UIKit/UIKit.h>
- @interface RadixViewController : UIViewController
- @property (weak, nonatomic) IBOutlet UILabel *output;
- @property (weak, nonatomic) IBOutlet UITextField *Number_textField;
- @property (weak, nonatomic) IBOutlet UITextField *System_textFiels;
- @property (copy, nonatomic) NSString *UserNumber;
- @property (copy, nonatomic) NSString *UserSystem;
- @property int Num;
- @property int Sys;
- - (IBAction)InputNumber:(id)sender;
- - (IBAction)InputSystem:(id)sender;
- - (IBAction)Begining:(id)sender;
- @end
- RadixViewController.m
- #import "RadixViewController.h"
- @interface RadixViewController ()
- @end
- @implementation RadixViewController
- @synthesize UserNumber = _UserNumber;
- @synthesize UserSystem = _UserSystem;
- - (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)InputNumber:(id)sender {
- NSString *Number = self.Number_textField.text;
- _Num=[ Number intValue];
- }
- - (IBAction)InputSystem:(id)sender {
- NSString *System = self.System_textFiels.text;
- _Sys=[ System intValue];
- }
- - (IBAction)Begining:(id)sender {
- NSInteger res = _Num/_Sys;
- self.output.tag = res;
- }
- @end
Advertisement
Add Comment
Please, Sign In to add comment