Kosty_Fomin

Untitled

Feb 1st, 2014
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  1. RadixViewController.h
  2.  
  3.  
  4. #import <UIKit/UIKit.h>
  5.  
  6. @interface RadixViewController : UIViewController
  7.  
  8. @property (weak, nonatomic) IBOutlet UILabel *output;
  9. @property (weak, nonatomic) IBOutlet UITextField *Number_textField;
  10. @property (weak, nonatomic) IBOutlet UITextField *System_textFiels;
  11.  
  12. @property (copy, nonatomic) NSString *UserNumber;
  13. @property (copy, nonatomic) NSString *UserSystem;
  14.  
  15. @property int Num;
  16. @property int Sys;
  17.  
  18.  
  19. - (IBAction)InputNumber:(id)sender;
  20. - (IBAction)InputSystem:(id)sender;
  21. - (IBAction)Begining:(id)sender;
  22.  
  23. @end
  24.  
  25.  
  26.  
  27. RadixViewController.m
  28.  
  29.  
  30.  
  31. #import "RadixViewController.h"
  32.  
  33. @interface RadixViewController ()
  34.  
  35. @end
  36.  
  37. @implementation RadixViewController
  38.  
  39. @synthesize UserNumber = _UserNumber;
  40.  
  41. @synthesize UserSystem = _UserSystem;
  42.  
  43. - (void)viewDidLoad
  44. {
  45. [super viewDidLoad];
  46. // Do any additional setup after loading the view, typically from a nib.
  47. }
  48.  
  49.  
  50. - (void)didReceiveMemoryWarning
  51. {
  52. [super didReceiveMemoryWarning];
  53. // Dispose of any resources that can be recreated.
  54. }
  55.  
  56. - (IBAction)InputNumber:(id)sender {
  57.  
  58. NSString *Number = self.Number_textField.text;
  59.  
  60. _Num=[ Number intValue];
  61.  
  62.  
  63.  
  64.  
  65. }
  66.  
  67. - (IBAction)InputSystem:(id)sender {
  68.  
  69. NSString *System = self.System_textFiels.text;
  70.  
  71. _Sys=[ System intValue];
  72.  
  73.  
  74.  
  75.  
  76. }
  77.  
  78. - (IBAction)Begining:(id)sender {
  79. NSInteger res = _Num/_Sys;
  80. self.output.tag = res;
  81. }
  82.  
  83. @end
Advertisement
Add Comment
Please, Sign In to add comment