Project Ok
| After Width: | Height: | Size: 98 KiB | 
| After Width: | Height: | Size: 121 KiB | 
| After Width: | Height: | Size: 144 KiB | 
| After Width: | Height: | Size: 74 KiB | 
| After Width: | Height: | Size: 61 KiB | 
| @ -0,0 +1,11 @@ | ||||
| # Uncomment the next line to define a global platform for your project | ||||
| platform :ios, '17.5' | ||||
| 
 | ||||
| target 'RK-Setup-Cocoa' do | ||||
|   # Comment the next line if you don't want to use dynamic frameworks | ||||
|   use_frameworks! | ||||
| 
 | ||||
|   # Pods for RK-Setup-Cocoa | ||||
|   pod 'ResearchKit', '~> 2.2.16' | ||||
| 
 | ||||
| end | ||||
| @ -0,0 +1,16 @@ | ||||
| PODS: | ||||
|   - ResearchKit (2.2.16) | ||||
| 
 | ||||
| DEPENDENCIES: | ||||
|   - ResearchKit (~> 2.2.16) | ||||
| 
 | ||||
| SPEC REPOS: | ||||
|   trunk: | ||||
|     - ResearchKit | ||||
| 
 | ||||
| SPEC CHECKSUMS: | ||||
|   ResearchKit: 4ce3751136fc82a02ac83f873b09b01b6974a761 | ||||
| 
 | ||||
| PODFILE CHECKSUM: 8b097b6531f757d05b3aa8db7bb3d8658d9fe7b9 | ||||
| 
 | ||||
| COCOAPODS: 1.15.2 | ||||
| @ -0,0 +1,10 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <Workspace | ||||
|    version = "1.0"> | ||||
|    <FileRef | ||||
|       location = "group:RK-Setup-Cocoa.xcodeproj"> | ||||
|    </FileRef> | ||||
|    <FileRef | ||||
|       location = "group:Pods/Pods.xcodeproj"> | ||||
|    </FileRef> | ||||
| </Workspace> | ||||
| @ -0,0 +1,8 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||||
| <plist version="1.0"> | ||||
| <dict> | ||||
| 	<key>IDEDidComputeMac32BitWarning</key> | ||||
| 	<true/> | ||||
| </dict> | ||||
| </plist> | ||||
| @ -1,24 +1,43 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r"> | ||||
| <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r"> | ||||
|     <device id="retina6_12" orientation="portrait" appearance="light"/> | ||||
|     <dependencies> | ||||
|         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/> | ||||
|         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/> | ||||
|         <capability name="Safe area layout guides" minToolsVersion="9.0"/> | ||||
|         <capability name="System colors in document resources" minToolsVersion="11.0"/> | ||||
|         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> | ||||
|     </dependencies> | ||||
|     <scenes> | ||||
|         <!--View Controller--> | ||||
|         <scene sceneID="tne-QT-ifu"> | ||||
|             <objects> | ||||
|                 <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController"> | ||||
|                 <viewController id="BYZ-38-t0r" customClass="ViewController" customModule="RK_Setup_Cocoa" customModuleProvider="target" sceneMemberID="viewController"> | ||||
|                     <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC"> | ||||
|                         <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> | ||||
|                         <rect key="frame" x="0.0" y="0.0" width="393" height="852"/> | ||||
|                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||||
|                         <color key="backgroundColor" xcode11CocoaTouchSystemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> | ||||
|                         <subviews> | ||||
|                             <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JyM-D2-S0W"> | ||||
|                                 <rect key="frame" x="159" y="409" width="75" height="35"/> | ||||
|                                 <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||||
|                                 <state key="normal" title="Button"/> | ||||
|                                 <buttonConfiguration key="configuration" style="plain" title="Button"/> | ||||
|                                 <connections> | ||||
|                                     <action selector="startSurveyTapped:" destination="BYZ-38-t0r" eventType="touchUpInside" id="YBX-WC-iRv"/> | ||||
|                                 </connections> | ||||
|                             </button> | ||||
|                         </subviews> | ||||
|                         <viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/> | ||||
|                         <color key="backgroundColor" systemColor="systemBackgroundColor"/> | ||||
|                     </view> | ||||
|                 </viewController> | ||||
|                 <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/> | ||||
|             </objects> | ||||
|             <point key="canvasLocation" x="132" y="-27"/> | ||||
|         </scene> | ||||
|     </scenes> | ||||
|     <resources> | ||||
|         <systemColor name="systemBackgroundColor"> | ||||
|             <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> | ||||
|         </systemColor> | ||||
|     </resources> | ||||
| </document> | ||||
|  | ||||
| @ -0,0 +1,40 @@ | ||||
| // | ||||
| //  SurveyTask.swift | ||||
| //  RK-Setup-Cocoa | ||||
| // | ||||
| //  Created by Gerardo Marx Chávez Campos on 09/10/24. | ||||
| // | ||||
| 
 | ||||
| import ResearchKit | ||||
| 
 | ||||
| // Define a simple survey task | ||||
| func createSurveyTask() -> ORKOrderedTask { | ||||
|     // Define a question step with a text answer format | ||||
|     let questionStepTitle = "How are you feeling today?" | ||||
|     let questionStep = ORKQuestionStep( | ||||
|         identifier: "QuestionStep", | ||||
|         title: questionStepTitle, | ||||
|         answer: ORKTextAnswerFormat(maximumLength: 100) | ||||
|     ) | ||||
|     questionStep.isOptional = false | ||||
| 
 | ||||
|     // Define another question as a scale (e.g., 1 to 10) | ||||
|     let scaleAnswerFormat = ORKAnswerFormat.scale( | ||||
|         withMaximumValue: 10, | ||||
|         minimumValue: 1, | ||||
|         defaultValue: 5, | ||||
|         step: 1, | ||||
|         vertical: false, | ||||
|         maximumValueDescription: "Excellent", | ||||
|         minimumValueDescription: "Terrible" | ||||
|     ) | ||||
|     let scaleStep = ORKQuestionStep( | ||||
|         identifier: "ScaleStep", | ||||
|         title: "Rate your overall well-being", | ||||
|         answer: scaleAnswerFormat | ||||
|     ) | ||||
|     scaleStep.isOptional = false | ||||
| 
 | ||||
|     // Create the ordered task with the steps | ||||
|     return ORKOrderedTask(identifier: "SurveyTask", steps: [questionStep, scaleStep]) | ||||
| } | ||||
| After Width: | Height: | Size: 111 KiB | 
| After Width: | Height: | Size: 39 KiB | 
| After Width: | Height: | Size: 625 KiB | 
| After Width: | Height: | Size: 34 KiB |