@@ -50,6 +50,7 @@ - (void)viewWillAppear:(BOOL)animated {
5050 [sendButton setSelectedTintColor: buttonSelectedColor];
5151 CGSize sendSize = [sendTitle sizeWithAttributes: @{NSFontAttributeName :sendButton.titleLabel .font }];
5252 sendButton.frame = CGRectMake (self.view .bounds .size .width - sendSize.width - 30 , 7 , sendSize.width , 50 );
53+ [sendButton addTarget: self action: @selector (actionSend: ) forControlEvents: UIControlEventTouchUpInside];
5354 [self .view addSubview: sendButton];
5455
5556
@@ -60,9 +61,20 @@ - (void)viewWillAppear:(BOOL)animated {
6061 [receiveButton setSelectedTintColor: buttonSelectedColor];
6162 CGSize receiveSize = [receiveTitle sizeWithAttributes: @{NSFontAttributeName :receiveButton.titleLabel .font }];
6263 receiveButton.frame = CGRectMake (self.view .bounds .size .width - receiveSize.width - sendSize.width - 60 , 12 , receiveSize.width , 50 );
64+ [receiveButton addTarget: self action: @selector (actionReceive: ) forControlEvents: UIControlEventTouchUpInside];
6365 [self .view addSubview: receiveButton];
6466}
6567
68+ - (void )actionSend : (id )sender {
69+ NSURL * url = [[NSURL alloc ] initWithScheme: @" bitstore" host: nil path: @" /send" ];
70+ [self .extensionContext openURL: url completionHandler: nil ];
71+ }
72+
73+ - (void )actionReceive : (id )sender {
74+ NSURL * url = [[NSURL alloc ] initWithScheme: @" bitstore" host: nil path: @" /receive" ];
75+ [self .extensionContext openURL: url completionHandler: nil ];
76+ }
77+
6678- (void )updatePriceLabel {
6779 SharedUser* user = [self user ];
6880 if (user.cachedPrice ) {
0 commit comments