Not sure if I understand your view hierarchy correctly, but I wouldn't recommend to put any logic that belongs to the model into the view.
I would make the ViewClass a subclass of UIControl so it can send events itself. And if the button was pressed you send a valueChangedEvent which is received by the viewController.
e.g:
// .h
@interface ViewClass : UIControl
@property (readonly, nonatomic) UIButton *button; // read only in public interface
@property (readonly, nonatomic) UITextField *textField;
@end
// .m
@interface ViewClass ()
@property (strong, nonatomic) UIButton *button; // readwrite in private interface
@property (strong, nonatomic) UITextField *textField;
@end
@implementation ViewClass
- (IBAction)buttonPressed:(UIButton *)sender {
// send valueChanged event to target
[self sendActionsForControlEvents:UIControlEventValueChanged];
}
@end
and your viewController:
- (void)viewDidLoad {
[super viewDidLoad];
ViewClass *myView = ...
[myView addTarget:self action:@selector(myViewDidChangeValue:) forControlEvents:UIControlEventValueChanged];
}
- (IBAction)myViewDidChangeValue:(ViewClass *)sender {
NSLog(@"Send \"%@\" to server", sender.textField.text);
}
And you can use addTarget:forControlEvents:
for subviews of a view as well. So you can actually connect the button of ViewClass to your viewController, you just might not be able to do it in Interface Builder.
[myView.button addTarget:self action:@selector(viewButtonTapped:) forControlEvents:UIControlEventTouchUpInside];