File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 20
20
<rect key =" frame" x =" 137.66666666666663" y =" 0.0" width =" 621" height =" 414" />
21
21
</imageView >
22
22
<stackView opaque =" NO" contentMode =" scaleToFill" axis =" vertical" spacing =" 8" translatesAutoresizingMaskIntoConstraints =" NO" id =" YXm-la-ajX" userLabel =" Contents Stack View" >
23
- <rect key =" frame" x =" 184" y =" 120.66666666666669 " width =" 528" height =" 232.66666666666663" />
23
+ <rect key =" frame" x =" 184" y =" 120.66666666666667 " width =" 528" height =" 232.66666666666663" />
24
24
<subviews >
25
25
<button opaque =" NO" contentMode =" scaleToFill" contentHorizontalAlignment =" fill" contentVerticalAlignment =" fill" lineBreakMode =" middleTruncation" translatesAutoresizingMaskIntoConstraints =" NO" id =" MKG-jo-3nz" userLabel =" Play Button" >
26
26
<rect key =" frame" x =" 0.0" y =" 0.0" width =" 528" height =" 134.33333333333334" />
44
44
<inset key =" imageEdgeInsets" minX =" 0.0" minY =" 0.0" maxX =" 2.2250738585072014e-308" maxY =" 0.0" />
45
45
<state key =" normal" image =" share" />
46
46
<connections >
47
- <action selector =" share" destination =" BYZ-38-t0r" eventType =" touchDown" id =" oei-Ah-MBF " />
47
+ <action selector =" share: " destination =" BYZ-38-t0r" eventType =" touchDown" id =" uS3-sI-gbQ " />
48
48
</connections >
49
49
</button >
50
50
<button opaque =" NO" contentMode =" scaleAspectFit" contentHorizontalAlignment =" fill" contentVerticalAlignment =" fill" lineBreakMode =" middleTruncation" translatesAutoresizingMaskIntoConstraints =" NO" id =" GOM-VT-roO" userLabel =" Listen Button" >
Original file line number Diff line number Diff line change 10
10
}
11
11
12
12
- (IBAction )play ;
13
- - (IBAction )share ;
13
+ - (IBAction )share : (UIButton*) sender ;
14
14
- (IBAction )listen ;
15
15
- (void )didEnterBackground : (NSNotification *)notification ;
16
16
- (void )willEnterForeground : (NSNotification *)notification ;
Original file line number Diff line number Diff line change @@ -72,10 +72,15 @@ - (IBAction)play {
72
72
[[[[UIApplication sharedApplication ] windows ] firstObject ] setRootViewController: vc];
73
73
}
74
74
75
- - (IBAction )share {
75
+ - (IBAction )share : (UIButton*) sender {
76
76
// Opens a share screen with a link of this project
77
77
NSURL *url = [NSURL URLWithString: SHARE_URL];
78
78
UIActivityViewController *vc = [[UIActivityViewController alloc ] initWithActivityItems: @[url] applicationActivities: nil ];
79
+
80
+ // Required for iPads
81
+ [[vc popoverPresentationController ] setSourceView: (UIView*)sender];
82
+ [[vc popoverPresentationController ] setSourceRect: sender.frame];
83
+
79
84
[self presentViewController: vc animated: YES completion: nil ];
80
85
}
81
86
You can’t perform that action at this time.
0 commit comments