diff --git a/ExampleViews/HapticFeedbackView.xojo_code b/ExampleViews/HapticFeedbackView.xojo_code new file mode 100644 index 0000000..6d0553e --- /dev/null +++ b/ExampleViews/HapticFeedbackView.xojo_code @@ -0,0 +1,436 @@ +#tag IOSView +Begin iosView HapticFeedbackView + BackButtonTitle = "" + Compatibility = "" + LargeTitleMode = "2" + Left = 0 + NavigationBarVisible= True + TabIcon = "" + TabTitle = "" + Title = "Haptic Feedback" + Top = 0 + Begin iOSLabel Label1 + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = Label1, 7, , 0, False, +1.00, 4, 1, 100, , True + AutoLayout = Label1, 9, , 9, False, +1.00, 4, 1, 0, , True + AutoLayout = Label1, 3, TopLayoutGuide, 4, False, +1.00, 4, 1, *kStdControlGapV, , True + AutoLayout = Label1, 8, , 0, False, +1.00, 4, 1, 30, , True + Enabled = True + Height = 30.0 + Left = 110 + LineBreakMode = "0" + LockedInPosition= False + Scope = 0 + Text = "Impact" + TextAlignment = "1" + TextColor = &c00000000 + TextFont = "System Bold " + TextSize = 0 + Top = 73 + Visible = True + Width = 100.0 + End + Begin iOSButton btImpactLight + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = btImpactLight, 8, , 0, False, +1.00, 4, 1, 30, , True + AutoLayout = btImpactLight, 2, btImpactMedium, 1, False, +1.00, 4, 1, -20, , True + AutoLayout = btImpactLight, 3, Label1, 4, False, +1.00, 4, 1, *kStdControlGapV, , True + AutoLayout = btImpactLight, 7, , 0, False, +1.00, 4, 1, 80, , True + Caption = "Light" + Enabled = True + Height = 30.0 + Left = 20 + LockedInPosition= False + Scope = 0 + TextColor = &c007AFF00 + TextFont = "" + TextSize = 0 + Top = 111 + Visible = True + Width = 80.0 + End + Begin iOSButton btImpactMedium + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = btImpactMedium, 9, , 9, False, +1.00, 4, 1, 0, , True + AutoLayout = btImpactMedium, 8, , 0, False, +1.00, 4, 1, 30, , True + AutoLayout = btImpactMedium, 3, Label1, 4, False, +1.00, 4, 1, *kStdControlGapV, , True + AutoLayout = btImpactMedium, 7, , 0, False, +1.00, 4, 1, 80, , True + Caption = "Medium" + Enabled = True + Height = 30.0 + Left = 120 + LockedInPosition= False + Scope = 0 + TextColor = &c007AFF00 + TextFont = "" + TextSize = 0 + Top = 111 + Visible = True + Width = 80.0 + End + Begin iOSButton btImpactHeavy + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = btImpactHeavy, 10, btImpactLight, 10, False, +1.00, 4, 1, 0, , True + AutoLayout = btImpactHeavy, 8, , 0, False, +1.00, 4, 1, 30, , True + AutoLayout = btImpactHeavy, 1, btImpactMedium, 2, False, +1.00, 4, 1, 20, , True + AutoLayout = btImpactHeavy, 7, , 0, False, +1.00, 4, 1, 80, , True + Caption = "Heavy" + Enabled = True + Height = 30.0 + Left = 220 + LockedInPosition= False + Scope = 0 + TextColor = &c007AFF00 + TextFont = "" + TextSize = 0 + Top = 111 + Visible = True + Width = 80.0 + End + Begin iOSLabel Label2 + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = Label2, 8, , 0, False, +1.00, 4, 1, 30, , True + AutoLayout = Label2, 1, Label1, 1, False, +1.00, 4, 1, 0, , True + AutoLayout = Label2, 3, btImpactMedium, 4, False, +1.00, 4, 1, 30, , True + AutoLayout = Label2, 7, , 0, False, +1.00, 4, 1, 100, , True + Enabled = True + Height = 30.0 + Left = 110 + LineBreakMode = "0" + LockedInPosition= False + Scope = 0 + Text = "Selection" + TextAlignment = "1" + TextColor = &c00000000 + TextFont = "System Bold " + TextSize = 0 + Top = 171 + Visible = True + Width = 100.0 + End + Begin iOSButton btSelectionChanged + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = btSelectionChanged, 9, , 9, False, +1.00, 4, 1, 0, , True + AutoLayout = btSelectionChanged, 8, , 0, False, +1.00, 4, 1, 30, , True + AutoLayout = btSelectionChanged, 3, Label2, 4, False, +1.00, 4, 1, *kStdControlGapV, , True + AutoLayout = btSelectionChanged, 7, , 0, False, +1.00, 4, 2, 120, , True + Caption = "Selection Changed" + Enabled = True + Height = 30.0 + Left = 100 + LockedInPosition= False + Scope = 0 + TextColor = &c007AFF00 + TextFont = "" + TextSize = 0 + Top = 209 + Visible = True + Width = 120.0 + End + Begin iOSLabel Label3 + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = Label3, 8, , 0, False, +1.00, 4, 1, 30, , True + AutoLayout = Label3, 1, Label2, 1, False, +1.00, 4, 1, 0, , True + AutoLayout = Label3, 3, btSelectionChanged, 4, False, +1.00, 4, 1, 30, , True + AutoLayout = Label3, 7, , 0, False, +1.00, 4, 1, 100, , True + Enabled = True + Height = 30.0 + Left = 110 + LineBreakMode = "0" + LockedInPosition= False + Scope = 0 + Text = "Selection" + TextAlignment = "1" + TextColor = &c00000000 + TextFont = "System Bold " + TextSize = 0 + Top = 269 + Visible = True + Width = 100.0 + End + Begin iOSButton btNotifError + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = btNotifError, 8, , 0, False, +1.00, 4, 1, 30, , True + AutoLayout = btNotifError, 1, btNotifWarning, 2, False, +1.00, 4, 1, 20, , True + AutoLayout = btNotifError, 3, Label3, 4, False, +1.00, 4, 1, *kStdControlGapV, , True + AutoLayout = btNotifError, 7, , 0, False, +1.00, 4, 1, 80, , True + Caption = "Error" + Enabled = True + Height = 30.0 + Left = 220 + LockedInPosition= False + Scope = 0 + TextColor = &c007AFF00 + TextFont = "" + TextSize = 0 + Top = 307 + Visible = True + Width = 80.0 + End + Begin iOSButton btNotifSuccess + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = btNotifSuccess, 8, , 0, False, +1.00, 4, 1, 30, , True + AutoLayout = btNotifSuccess, 2, btNotifWarning, 1, False, +1.00, 4, 1, -20, , True + AutoLayout = btNotifSuccess, 3, Label3, 4, False, +1.00, 4, 1, *kStdControlGapV, , True + AutoLayout = btNotifSuccess, 7, , 0, False, +1.00, 4, 1, 80, , True + Caption = "Success" + Enabled = True + Height = 30.0 + Left = 20 + LockedInPosition= False + Scope = 0 + TextColor = &c007AFF00 + TextFont = "" + TextSize = 0 + Top = 307 + Visible = True + Width = 80.0 + End + Begin iOSButton btNotifWarning + AccessibilityHint= "" + AccessibilityLabel= "" + AutoLayout = btNotifWarning, 1, btImpactMedium, 1, False, +1.00, 4, 1, 0, , True + AutoLayout = btNotifWarning, 7, , 0, False, +1.00, 4, 1, 80, , True + AutoLayout = btNotifWarning, 3, Label3, 4, False, +1.00, 4, 1, *kStdControlGapV, , True + AutoLayout = btNotifWarning, 8, , 0, False, +1.00, 4, 1, 30, , True + Caption = "Warning" + Enabled = True + Height = 30.0 + Left = 120 + LockedInPosition= False + Scope = 0 + TextColor = &c007AFF00 + TextFont = "" + TextSize = 0 + Top = 307 + Visible = True + Width = 80.0 + End +End +#tag EndIOSView + +#tag WindowCode + #tag Property, Flags = &h21 + Private HapImpactHeavy As UIImpactFeedbackGenerator + #tag EndProperty + + #tag Property, Flags = &h21 + Private HapImpactLight As UIImpactFeedbackGenerator + #tag EndProperty + + #tag Property, Flags = &h21 + Private HapImpactMedium As UIImpactFeedbackGenerator + #tag EndProperty + + #tag Property, Flags = &h21 + Private HapNotification As UINotificationFeedbackGenerator + #tag EndProperty + + #tag Property, Flags = &h21 + Private HapSelection As UISelectionFeedbackGenerator + #tag EndProperty + + +#tag EndWindowCode + +#tag Events btImpactLight + #tag Event + Sub Action() + + If HapImpactLight Is Nil Then + + HapImpactLight = New UIImpactFeedbackGenerator(UIImpactFeedbackGenerator.UIImpactFeedbackStyle.light) + + End If + + HapImpactLight.Prepare + + HapImpactLight.ImpactOccurred + + End Sub + #tag EndEvent +#tag EndEvents +#tag Events btImpactMedium + #tag Event + Sub Action() + + If HapImpactMedium Is Nil Then + + HapImpactMedium = New UIImpactFeedbackGenerator(UIImpactFeedbackGenerator.UIImpactFeedbackStyle.medium) + + End If + + HapImpactMedium.Prepare + + HapImpactMedium.ImpactOccurred + + End Sub + #tag EndEvent +#tag EndEvents +#tag Events btImpactHeavy + #tag Event + Sub Action() + + + If HapImpactHeavy Is Nil Then + + HapImpactHeavy = New UIImpactFeedbackGenerator(UIImpactFeedbackGenerator.UIImpactFeedbackStyle.heavy) + + End If + + HapImpactHeavy.Prepare + + HapImpactHeavy.ImpactOccurred + + End Sub + #tag EndEvent +#tag EndEvents +#tag Events btSelectionChanged + #tag Event + Sub Action() + + If HapSelection Is Nil Then + + HapSelection = New UISelectionFeedbackGenerator + + End If + + HapSelection.Prepare + + HapSelection.SelectionChanged + + End Sub + #tag EndEvent +#tag EndEvents +#tag Events btNotifError + #tag Event + Sub Action() + + If HapNotification Is Nil Then + + HapNotification = New UINotificationFeedbackGenerator + + End If + + HapNotification.Prepare + + HapNotification.NotificationOccurred(UINotificationFeedbackGenerator.UINotificationFeedbackType.error) + End Sub + #tag EndEvent +#tag EndEvents +#tag Events btNotifSuccess + #tag Event + Sub Action() + + If HapNotification Is Nil Then + + HapNotification = New UINotificationFeedbackGenerator + + End If + + HapNotification.Prepare + + HapNotification.NotificationOccurred(UINotificationFeedbackGenerator.UINotificationFeedbackType.success) + End Sub + #tag EndEvent +#tag EndEvents +#tag Events btNotifWarning + #tag Event + Sub Action() + + If HapNotification Is Nil Then + + HapNotification = New UINotificationFeedbackGenerator + + End If + + HapNotification.Prepare + + HapNotification.NotificationOccurred(UINotificationFeedbackGenerator.UINotificationFeedbackType.warning) + End Sub + #tag EndEvent +#tag EndEvents +#tag ViewBehavior + #tag ViewProperty + Name="Index" + Visible=true + Group="ID" + InitialValue="-2147483648" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Name" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Super" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Left" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Top" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="BackButtonTitle" + Group="Behavior" + Type="Text" + EditorType="MultiLineEditor" + #tag EndViewProperty + #tag ViewProperty + Name="NavigationBarVisible" + Group="Behavior" + Type="Boolean" + #tag EndViewProperty + #tag ViewProperty + Name="TabIcon" + Group="Behavior" + Type="iOSImage" + #tag EndViewProperty + #tag ViewProperty + Name="TabTitle" + Group="Behavior" + Type="Text" + #tag EndViewProperty + #tag ViewProperty + Name="Title" + Group="Behavior" + Type="Text" + EditorType="MultiLineEditor" + #tag EndViewProperty + #tag ViewProperty + Name="LargeTitleMode" + Visible=true + Group="Behavior" + InitialValue="2" + Type="LargeTitleDisplayModes" + EditorType="Enum" + #tag EnumValues + "0 - Automatic" + "1 - Always" + "2 - Never" + #tag EndEnumValues + #tag EndViewProperty +#tag EndViewBehavior diff --git a/ExampleViews/MainView.xojo_code b/ExampleViews/MainView.xojo_code index 6a62920..66f7865 100644 --- a/ExampleViews/MainView.xojo_code +++ b/ExampleViews/MainView.xojo_code @@ -2,6 +2,7 @@ Begin iosView MainView BackButtonTitle = "" Compatibility = "" + LargeTitleMode = "2" Left = 0 NavigationBarVisible= True TabIcon = "" @@ -11,10 +12,11 @@ Begin iosView MainView Begin iOSTable Table1 AccessibilityHint= "" AccessibilityLabel= "" - AutoLayout = Table1, 4, BottomLayoutGuide, 4, False, +1.00, 1, 1, -69, - AutoLayout = Table1, 2, , 2, False, +1.00, 1, 1, -0, - AutoLayout = Table1, 3, TopLayoutGuide, 4, False, +1.00, 1, 1, *kStdControlGapV, - AutoLayout = Table1, 1, , 1, False, +1.00, 1, 1, 0, + AllowRefresh = False + AutoLayout = Table1, 4, BottomLayoutGuide, 4, False, +1.00, 1, 1, -69, , True + AutoLayout = Table1, 2, , 2, False, +1.00, 1, 1, -0, , True + AutoLayout = Table1, 3, TopLayoutGuide, 4, False, +1.00, 1, 1, *kStdControlGapV, , True + AutoLayout = Table1, 1, , 1, False, +1.00, 1, 1, 0, , True EditingEnabled = False EditingEnabled = False EstimatedRowHeight= -1 @@ -74,206 +76,225 @@ End // 13 = Unit Tests // 14 = GameKit - dim newMasterView as iOSView - dim newDetailView as iOSView + Dim newMasterView As iOSView + Dim newDetailView As iOSView - select case row - case 0 - newDetailView = new ActivityView - case 1 - newDetailView = new CameraView - case 2 - newDetailView = new MissingControlsView - case 3 - newDetailView = new CreateQRView - case 4 - newDetailView = new ReadQRView - case 5 - newDetailView = new SoundsView - case 6 - newDetailView = new EmailView - case 7 - newDetailView = new ReachabilityView - case 8 - newDetailView = new CoreMotionView - case 9 - newDetailView = new KeychainView - case 10 - newDetailView = new AVFoundationDemoView - case 11 - newDetailView = new RecordPlayVideo - case 12 - newDetailView = new UIAlertView - case 13 - newDetailView = new ShakingView - case 14 - newDetailView = new GameKitDemoView - case 15 + Select Case row + Case 0 + newDetailView = New ActivityView + Case 1 + newDetailView = New CameraView + Case 2 + newDetailView = New MissingControlsView + Case 3 + newDetailView = New CreateQRView + Case 4 + newDetailView = New ReadQRView + Case 5 + newDetailView = New SoundsView + Case 6 + newDetailView = New EmailView + Case 7 + newDetailView = New ReachabilityView + Case 8 + newDetailView = New CoreMotionView + Case 9 + newDetailView = New KeychainView + Case 10 + newDetailView = New AVFoundationDemoView + Case 11 + newDetailView = New RecordPlayVideo + Case 12 + newDetailView = New UIAlertView + Case 13 + newDetailView = New ShakingView + Case 14 + newDetailView = New GameKitDemoView + Case 15 'newDetailView = new UIDocumentPickerView //for a future version when entitlements actually work - case 16 - newDetailView = new improvediOSTableView - case 17 - newMasterView = new XojoUnitTestGroupView - newDetailView = new XojoUnitTestDetailsView - else + Case 16 + newDetailView = New improvediOSTableView + Case 17 + newDetailView = New HapticFeedbackView + Case 18 + newMasterView = New XojoUnitTestGroupView + newDetailView = New XojoUnitTestDetailsView + + Else //shouldn't get here Return - end select + End Select 'declare sub presentViewController_ lib UIKitLib selector "presentViewController:animated:completion:" (obj_id as ptr, viewControllerToPresent as ptr, flag as Boolean, completion as ptr) 'PresentViewController_(self.ViewControllerHandle, newDetailView.ViewControllerHandle, True, nil) - if newMasterView isa iOSView then - self.PushTo newMasterView - end if + If newMasterView IsA iOSView Then + Self.PushTo newMasterView + End If - if newDetailView isa iOSView then - if ParentSplitView.Available then - self.ParentSplitView.Detail = newDetailView - else - self.PushTo newDetailView - end if + If newDetailView IsA iOSView Then + If ParentSplitView.Available Then + Self.ParentSplitView.Detail = newDetailView + Else + Self.PushTo newDetailView + End If end if End Sub #tag EndEvent #tag Event Sub Open() - me.AddSection("Select a view") - dim d as iOSTableCellData - #if XojoVersion < 2016.03 - d = new iOSTableCellData("UIActivityView") + Me.AddSection("Select a view") + Dim d As iOSTableCellData + #If XojoVersion < 2016.03 + d = New iOSTableCellData("UIActivityView") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Camera") + d = New iOSTableCellData("Camera") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Missing UIControls") + d = New iOSTableCellData("Missing UIControls") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Create QRCode") + d = New iOSTableCellData("Create QRCode") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Read QRCode") + d = New iOSTableCellData("Read QRCode") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("System Sounds") + d = New iOSTableCellData("System Sounds") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Email") + d = New iOSTableCellData("Email") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Reachability") + d = New iOSTableCellData("Reachability") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Core Motion") + d = New iOSTableCellData("Core Motion") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Keychain Services") + d = New iOSTableCellData("Keychain Services") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("AVFoundation Demos") + d = New iOSTableCellData("AVFoundation Demos") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Record and Play video") + d = New iOSTableCellData("Record and Play video") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("UIActionController") + d = New iOSTableCellData("UIActionController") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Shaking") + d = New iOSTableCellData("Shaking") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("GameKit Demos (In progress)") + d = New iOSTableCellData("GameKit Demos (In progress)") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("UIDocumentPicker") + d = New iOSTableCellData("UIDocumentPicker") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - d = new iOSTableCellData("Improved iOSTable") + d = New iOSTableCellData("Improved iOSTable") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) + Me.AddRow(0,d) - if self.ParentSplitView.Available then - d = new iOSTableCellData("Unit Tests") + If Self.ParentSplitView.Available Then + d = New iOSTableCellData("Unit Tests") d.AccessoryType = iOSTableCellData.AccessoryTypes.Disclosure - me.AddRow(0,d) - end if - #else - d = me.CreateCell("UIActivityView","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + Me.AddRow(0,d) + End If + #Else + d = Me.CreateCell("UIActivityView","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) + + d = Me.CreateCell("Camera","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Camera","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Missing UIControls","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Missing UIControls","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Create QRCode","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Create QRCode","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Read QRCode","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Read QRCode","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("System Sounds","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("System Sounds","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Email","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Email","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Reachability","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Reachability","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Core Motion","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Core Motion","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Keychain Services","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Keychain Services","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("AVFoundation Demos","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("AVFoundation Demos","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Record and Play video","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Record and Play video","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("UIActionController","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("UIActionController","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Shaking","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Shaking","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("GameKit Demos (In progress)","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("GameKit Demos (In progress)","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("UIDocumentPicker","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("UIDocumentPicker","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Improved iOSTable","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - d = me.CreateCell("Improved iOSTable","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) + d = Me.CreateCell("Haptic Feedback","iPhone only",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) - if self.ParentSplitView.Available then - d = me.CreateCell("Unit Tests","",nil,iOSTableCellData.AccessoryTypes.Disclosure) - me.AddRow(0,d) - end if + If Self.ParentSplitView.Available Then + d = Me.CreateCell("Unit Tests","",Nil,iOSTableCellData.AccessoryTypes.Disclosure) + Me.AddRow(0,d) + End If #endif End Sub #tag EndEvent #tag EndEvents #tag ViewBehavior + #tag ViewProperty + Name="LargeTitleMode" + Visible=true + Group="Behavior" + InitialValue="2" + Type="LargeTitleDisplayModes" + EditorType="Enum" + #tag EnumValues + "0 - Automatic" + "1 - Always" + "2 - Never" + #tag EndEnumValues + #tag EndViewProperty #tag ViewProperty Name="BackButtonTitle" Group="Behavior" diff --git a/Modules/UIKit/UIFeedbackGenerator.xojo_code b/Modules/UIKit/UIFeedbackGenerator.xojo_code new file mode 100644 index 0000000..e40fffd --- /dev/null +++ b/Modules/UIKit/UIFeedbackGenerator.xojo_code @@ -0,0 +1,63 @@ +#tag Class +Protected Class UIFeedbackGenerator +Inherits NSObject + #tag Method, Flags = &h21 + Private Sub Constructor() + // Calling the overridden superclass constructor. + // Note that this may need modifications if there are multiple constructor choices. + // Possible constructor calls: + // Constructor() -- From NSObject + // Constructor(ref as ptr) -- From NSObject + 'Super.Constructor + + //Making this private to not instantiate the superclass of UIFeedbackGenerator + End Sub + #tag EndMethod + + #tag Method, Flags = &h0, Description = 5072657061726573207468652074617074696320656E67696E65 + Sub Prepare() + + Declare Sub prepare Lib UIKitLib selector "prepare" (obj_id As ptr) + + prepare(self.id) + End Sub + #tag EndMethod + + + #tag ViewBehavior + #tag ViewProperty + Name="Index" + Visible=true + Group="ID" + InitialValue="-2147483648" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Left" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Name" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Super" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Top" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag EndViewBehavior +End Class +#tag EndClass diff --git a/Modules/UIKit/UIImpactFeedbackGenerator.xojo_code b/Modules/UIKit/UIImpactFeedbackGenerator.xojo_code new file mode 100644 index 0000000..a5a0fff --- /dev/null +++ b/Modules/UIKit/UIImpactFeedbackGenerator.xojo_code @@ -0,0 +1,73 @@ +#tag Class +Class UIImpactFeedbackGenerator +Inherits UIFeedbackGenerator + #tag Method, Flags = &h0 + Sub Constructor(style As UIImpactFeedbackStyle) + // Calling the overridden superclass constructor. + // Note that this may need modifications if there are multiple constructor choices. + // Possible constructor calls: + // Constructor() -- From UIFeedbackGenerator + // Constructor() -- From NSObject + // Constructor(ref as ptr) -- From NSObject + + Declare Function initWithStyle Lib UIKitLib selector "initWithStyle:" (obj_id As ptr, st As UIImpactFeedbackStyle) as ptr + + + Super.Constructor(initWithStyle(Allocate(NSClassFromString("UIImpactFeedbackGenerator")), style)) + End Sub + #tag EndMethod + + #tag Method, Flags = &h0, Description = 547269676765727320696D7061637420666565646261636B + Sub ImpactOccurred() + + Declare Sub impactOccurred_ Lib UIKitLib selector "impactOccurred" (obj_id As ptr) + + impactOccurred_(Self.id) + End Sub + #tag EndMethod + + + #tag Enum, Name = UIImpactFeedbackStyle, Type = Integer, Flags = &h0 + light = 0 + medium + heavy + #tag EndEnum + + + #tag ViewBehavior + #tag ViewProperty + Name="Index" + Visible=true + Group="ID" + InitialValue="-2147483648" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Left" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Name" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Super" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Top" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag EndViewBehavior +End Class +#tag EndClass diff --git a/Modules/UIKit/UINotificationFeedbackGenerator.xojo_code b/Modules/UIKit/UINotificationFeedbackGenerator.xojo_code new file mode 100644 index 0000000..580bbba --- /dev/null +++ b/Modules/UIKit/UINotificationFeedbackGenerator.xojo_code @@ -0,0 +1,72 @@ +#tag Class +Class UINotificationFeedbackGenerator +Inherits UIFeedbackGenerator + #tag Method, Flags = &h0 + Sub Constructor() + // Calling the overridden superclass constructor. + // Note that this may need modifications if there are multiple constructor choices. + // Possible constructor calls: + // Constructor() -- From UIFeedbackGenerator + // Constructor() -- From NSObject + // Constructor(ref as ptr) -- From NSObject + + + + Super.Constructor(initialize(Allocate(NSClassFromString("UINotificationFeedbackGenerator")))) + End Sub + #tag EndMethod + + #tag Method, Flags = &h0, Description = 54726967676572732073656C656374696F6E20666565646261636B2E + Sub NotificationOccurred(type As UINotificationFeedbackType) + + Declare Sub notificationOccurred_ Lib UIKitLib selector "notificationOccurred:" (obj_id As ptr, tp As UINotificationFeedbackType) + + notificationOccurred_(self.id, type) + End Sub + #tag EndMethod + + + #tag Enum, Name = UINotificationFeedbackType, Type = Integer, Flags = &h0 + success = 0 + warning + error + #tag EndEnum + + + #tag ViewBehavior + #tag ViewProperty + Name="Index" + Visible=true + Group="ID" + InitialValue="-2147483648" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Left" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Name" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Super" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Top" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag EndViewBehavior +End Class +#tag EndClass diff --git a/Modules/UIKit/UISelectionFeedbackGenerator.xojo_code b/Modules/UIKit/UISelectionFeedbackGenerator.xojo_code new file mode 100644 index 0000000..f191c60 --- /dev/null +++ b/Modules/UIKit/UISelectionFeedbackGenerator.xojo_code @@ -0,0 +1,65 @@ +#tag Class +Class UISelectionFeedbackGenerator +Inherits UIFeedbackGenerator + #tag Method, Flags = &h0 + Sub Constructor() + // Calling the overridden superclass constructor. + // Note that this may need modifications if there are multiple constructor choices. + // Possible constructor calls: + // Constructor() -- From UIFeedbackGenerator + // Constructor() -- From NSObject + // Constructor(ref as ptr) -- From NSObject + + + + Super.Constructor(initialize(Allocate(NSClassFromString("UISelectionFeedbackGenerator")))) + End Sub + #tag EndMethod + + #tag Method, Flags = &h0, Description = 54726967676572732073656C656374696F6E20666565646261636B2E + Sub SelectionChanged() + + Declare Sub SelectionChanged_ Lib UIKitLib selector "selectionChanged" (obj_id As ptr) + + SelectionChanged_(self.id) + End Sub + #tag EndMethod + + + #tag ViewBehavior + #tag ViewProperty + Name="Index" + Visible=true + Group="ID" + InitialValue="-2147483648" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Left" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag ViewProperty + Name="Name" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Super" + Visible=true + Group="ID" + Type="String" + #tag EndViewProperty + #tag ViewProperty + Name="Top" + Visible=true + Group="Position" + InitialValue="0" + Type="Integer" + #tag EndViewProperty + #tag EndViewBehavior +End Class +#tag EndClass diff --git a/iOSKit.xojo_project b/iOSKit.xojo_project index 51b41cf..c8040d1 100644 --- a/iOSKit.xojo_project +++ b/iOSKit.xojo_project @@ -1,5 +1,5 @@ Type=iOS -RBProjectVersion=2018.01 +RBProjectVersion=2018.02 MinIDEVersion=20140300 Class=App;App.xojo_code;&h000000005FAFE765;&h0000000000000000;false iOSScreen=iPhoneScreen;iPhoneScreen.xojo_code;&h0000000015810A9D;&h0000000000000000;false @@ -226,6 +226,11 @@ Class=TestResult;XojoUnit/TestFramework/TestResult.xojo_code;&h000000001624A4EB; iOSView=XojoUnitTestGroupView;XojoUnit/XojoUnitTestGroupView.xojo_code;&h000000001A070FFF;&h000000002516B04D;false iOSView=XojoUnitTestMethodView;XojoUnit/XojoUnitTestMethodView.xojo_code;&h0000000038986FFF;&h000000002516B04D;false iOSView=XojoUnitTestDetailsView;XojoUnit/XojoUnitTestDetailsView.xojo_code;&h00000000215E17FF;&h000000002516B04D;false +Class=UIFeedbackGenerator;Modules/UIKit/UIFeedbackGenerator.xojo_code;&h0000000009EE4FFF;&h0000000005DD9374;false +Class=UIImpactFeedbackGenerator;Modules/UIKit/UIImpactFeedbackGenerator.xojo_code;&h000000004A5587FF;&h0000000005DD9374;false +Class=UINotificationFeedbackGenerator;Modules/UIKit/UINotificationFeedbackGenerator.xojo_code;&h000000000BDBBFFF;&h0000000005DD9374;false +Class=UISelectionFeedbackGenerator;Modules/UIKit/UISelectionFeedbackGenerator.xojo_code;&h000000001CC31FFF;&h0000000005DD9374;false +iOSView=HapticFeedbackView;ExampleViews/HapticFeedbackView.xojo_code;&h0000000006596FFF;&h000000001989717F;false Class=UIPopoverPresentationController;Modules/UIKit/UIPopoverPresentationController.xojo_code;&h0000000003E4BFFF;&h0000000005DD9374;false DefaultScreen=iPhoneScreen DefaultTabletScreen=iPadScreen