├── .gitignore ├── ARMParse.py ├── ARMRef ├── ARMRef.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── ARMRef.xcscheme └── ARMRef │ ├── AppDelegate.m │ ├── Resource │ ├── ARM64.entitlements │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon@2x.png │ │ │ ├── icon_20pt.png │ │ │ ├── icon_20pt@2x-1.png │ │ │ ├── icon_20pt@2x.png │ │ │ ├── icon_20pt@3x.png │ │ │ ├── icon_29pt.png │ │ │ ├── icon_29pt@2x-1.png │ │ │ ├── icon_29pt@2x.png │ │ │ ├── icon_29pt@3x.png │ │ │ ├── icon_40pt.png │ │ │ ├── icon_40pt@2x-1.png │ │ │ ├── icon_40pt@2x.png │ │ │ ├── icon_40pt@3x.png │ │ │ ├── icon_60pt@2x.png │ │ │ ├── icon_60pt@3x.png │ │ │ ├── icon_76pt.png │ │ │ ├── icon_76pt@2x.png │ │ │ └── icon_83.5@2x.png │ │ ├── Contents.json │ │ ├── copyright.imageset │ │ │ ├── Contents.json │ │ │ ├── copyright@2x.png │ │ │ └── copyright@3x.png │ │ └── cpu.imageset │ │ │ ├── Contents.json │ │ │ ├── cpu@2x.png │ │ │ └── cpu@3x.png │ ├── Info.plist │ ├── LaunchScreen.storyboard │ └── References │ │ ├── ARMv8.6a (32-bit).json │ │ └── ARMv8.6a.json │ └── Source │ ├── AAppDelegate.h │ ├── AAppDelegate.m │ ├── Architecture │ ├── AArchitectureViewController.h │ └── AArchitectureViewController.m │ ├── Categories │ ├── NSString+A.h │ ├── NSString+A.m │ ├── UIColor+A.h │ └── UIColor+A.m │ ├── CollectionView │ ├── ACollectionReusableHeaderView.h │ ├── ACollectionReusableHeaderView.m │ ├── ACollectionView.h │ ├── ACollectionView.m │ ├── ACollectionViewCell.h │ ├── ACollectionViewCell.m │ ├── ACollectionViewDataHandle.h │ └── ACollectionViewDataHandle.m │ ├── Defines.h │ ├── Instruction │ ├── AInstructionView.h │ ├── AInstructionView.m │ ├── AInstructionViewController.h │ └── AInstructionViewController.m │ ├── InstructionLoader │ ├── AInstruction.h │ ├── AInstruction.m │ ├── AInstructionLoader.h │ ├── AInstructionLoader.m │ ├── AInstructions.h │ └── AInstructions.m │ ├── Main │ ├── AMainViewController.h │ ├── AMainViewController.m │ ├── ANavigationController.h │ └── ANavigationController.m │ ├── PrefixHeader.pch │ ├── WebView │ ├── AWebViewController.h │ └── AWebViewController.m │ └── main.m ├── LICENSE ├── README.md ├── all.png ├── icon.sketch ├── icons ├── Icon.png ├── Icon@2x.png ├── icon_20pt.png ├── icon_20pt@2x.png ├── icon_20pt@3x.png ├── icon_29pt.png ├── icon_29pt@2x.png ├── icon_29pt@3x.png ├── icon_40pt.png ├── icon_40pt@2x.png ├── icon_40pt@3x.png ├── icon_60pt@2x.png ├── icon_60pt@3x.png ├── icon_76pt.png ├── icon_76pt@2x.png └── icon_83.5@2x.png ├── splash.sketch └── splash ├── copyright@2x.png ├── copyright@3x.png ├── cpu@2x.png └── cpu@3x.png /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | ## User settings 4 | xcuserdata/ 5 | 6 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 7 | *.xcscmblueprint 8 | *.xccheckout 9 | 10 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 11 | build/ 12 | DerivedData/ 13 | *.moved-aside 14 | *.pbxuser 15 | !default.pbxuser 16 | *.mode1v3 17 | !default.mode1v3 18 | *.mode2v3 19 | !default.mode2v3 20 | *.perspectivev3 21 | !default.perspectivev3 -------------------------------------------------------------------------------- /ARMParse.py: -------------------------------------------------------------------------------- 1 | # 2 | # pasre.py 3 | # 4 | # Copyright (c) 2020 ARMRef (https:#github.com/evilpenguin/ARMRef) 5 | # 6 | # Permission is hereby granted, free of charge, to any person obtaining a copy 7 | # of this software and associated documentation files (the "Software"), to deal 8 | # in the Software without restriction, including without limitation the rights 9 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | # copies of the Software, and to permit persons to whom the Software is 11 | # furnished to do so, subject to the following conditions: 12 | # 13 | # The above copyright notice and this permission notice shall be included in 14 | # all copies or substantial portions of the Software. 15 | # 16 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | # THE SOFTWARE. 23 | 24 | import argparse 25 | import json 26 | 27 | from pathlib import Path 28 | from lxml import etree 29 | 30 | def _node_text(node): 31 | result = "" 32 | 33 | if node.text: 34 | result = node.text 35 | 36 | for child in node: 37 | if child.tail is not None: 38 | result += child.tail 39 | 40 | return result.strip() 41 | 42 | def _parse(atPath): 43 | dictionary = [] 44 | 45 | # Paths 46 | paths = [pth for pth in Path(atPath).iterdir() if pth.suffix == ".xml"] 47 | 48 | # Loop 49 | for path in paths: 50 | with open(path) as fd: 51 | instruction = {} 52 | 53 | # Root 54 | root = etree.parse(fd).getroot() 55 | 56 | # Mnemonic 57 | heading = root.xpath("heading") 58 | if heading is None or len(heading) == 0: continue 59 | instruction["mnemonic"] = _node_text(heading[0]) 60 | 61 | # Short desc 62 | brief = root.xpath("desc/brief/para") 63 | if brief is None or len(brief) == 0: brief = root.xpath("desc/brief") 64 | if brief and len(brief) > 0: 65 | instruction["short_desc"] = _node_text(brief[0]) 66 | 67 | # Full desc 68 | authored = root.xpath("desc/authored/para") 69 | if authored is None or len(authored) == 0: authored = root.xpath("desc/description/para") 70 | if authored and len(authored) > 0: 71 | instruction["full_desc"] = _node_text(authored[0]) 72 | 73 | # Syntax 74 | instruction["syntax"] = [] 75 | for asmtemplate in root.iterfind("classes/iclass/encoding/asmtemplate"): 76 | syntax_text = "".join(asmtemplate.itertext()).strip() 77 | label = asmtemplate.getparent().attrib["label"].strip() 78 | instruction["syntax"].append(f"{syntax_text}\t; {label}") 79 | 80 | # Symbols 81 | instruction["symbols"] = [] 82 | for explanations in root.iterfind("explanations/explanation"): 83 | symbol = "" 84 | intro = "" 85 | 86 | for explanation in explanations.getchildren(): 87 | if "symbol" in explanation.tag: 88 | symbol = _node_text(explanation) 89 | elif "account" in explanation.tag: 90 | intro = _node_text(explanation.xpath("intro/para")[0]) 91 | 92 | instruction["symbols"].append(f"{symbol}\n{intro}") 93 | 94 | # Decode 95 | decode = root.xpath("classes/iclass/ps_section/ps/pstext") 96 | if decode and len(decode) > 0: 97 | instruction["decode"] = "".join(decode[0].itertext()).strip() 98 | 99 | # Operation 100 | execute = root.xpath("ps_section/ps/pstext") 101 | if execute and len(execute) > 0: 102 | instruction["operation"] = "".join(execute[0].itertext()).strip() 103 | 104 | # Add instruction 105 | if len(instruction) > 0: 106 | dictionary.append(instruction) 107 | 108 | return dictionary 109 | 110 | def _main(): 111 | # Args 112 | argParser = argparse.ArgumentParser(prog="ARMParse") 113 | argParser.add_argument("--dir", "-d", metavar="DIRECTORY", help="the DIRECTORY to parse.", default=None, required=True) 114 | argParser.add_argument("--json", "-j", metavar="JSON_FILE", help="the JSON_FILE we are saving to.", default=None, required=False) 115 | args = argParser.parse_args() 116 | 117 | # Parse 118 | dictionary = _parse(atPath=args.dir) 119 | 120 | # Output 121 | if args.json: 122 | with open(args.json, "w") as json_file: 123 | json_file.write(json.dumps(dictionary)) 124 | else: 125 | print(json.dumps(decoded)) 126 | 127 | if __name__ == "__main__": 128 | _main() 129 | -------------------------------------------------------------------------------- /ARMRef/ARMRef.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | A99EA5C924B29F0E007744F1 /* ARMv8.6a.json in Resources */ = {isa = PBXBuildFile; fileRef = A99EA5C724B29F0E007744F1 /* ARMv8.6a.json */; }; 11 | A99EA5CA24B29F0E007744F1 /* ARMv8.6a (32-bit).json in Resources */ = {isa = PBXBuildFile; fileRef = A99EA5C824B29F0E007744F1 /* ARMv8.6a (32-bit).json */; }; 12 | A99EA5CD24B2A51B007744F1 /* AArchitectureViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A99EA5CC24B2A51B007744F1 /* AArchitectureViewController.m */; }; 13 | A99EA5D124BE70C0007744F1 /* ACollectionReusableHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = A99EA5D024BE70C0007744F1 /* ACollectionReusableHeaderView.m */; }; 14 | A99EA5D424BE7411007744F1 /* AInstructions.m in Sources */ = {isa = PBXBuildFile; fileRef = A99EA5D324BE7411007744F1 /* AInstructions.m */; }; 15 | A99EA5D724BE94F0007744F1 /* NSString+A.m in Sources */ = {isa = PBXBuildFile; fileRef = A99EA5D624BE94F0007744F1 /* NSString+A.m */; }; 16 | A9A6CE9224A9354F00C738BD /* AAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CE9124A9354F00C738BD /* AAppDelegate.m */; }; 17 | A9A6CE9824A9354F00C738BD /* AMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CE9724A9354F00C738BD /* AMainViewController.m */; }; 18 | A9A6CE9D24A9355000C738BD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A9A6CE9C24A9355000C738BD /* Assets.xcassets */; }; 19 | A9A6CEA324A9355000C738BD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CEA224A9355000C738BD /* main.m */; }; 20 | A9A6CEB024A9469300C738BD /* AInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CEAF24A9469300C738BD /* AInstruction.m */; }; 21 | A9A6CEB324A946D900C738BD /* AInstructionLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CEB224A946D900C738BD /* AInstructionLoader.m */; }; 22 | A9A6CEB824A94F4500C738BD /* ACollectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CEB724A94F4500C738BD /* ACollectionView.m */; }; 23 | A9A6CEBB24A94FF000C738BD /* ACollectionViewDataHandle.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CEBA24A94FF000C738BD /* ACollectionViewDataHandle.m */; }; 24 | A9A6CEBE24A950DA00C738BD /* ACollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CEBD24A950DA00C738BD /* ACollectionViewCell.m */; }; 25 | A9A6CED624AF9CD900C738BD /* AInstructionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CED524AF9CD900C738BD /* AInstructionViewController.m */; }; 26 | A9A6CEDA24AFA18100C738BD /* UIColor+A.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CED924AFA18100C738BD /* UIColor+A.m */; }; 27 | A9A6CEDD24AFA7A200C738BD /* AInstructionView.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CEDC24AFA7A200C738BD /* AInstructionView.m */; }; 28 | A9A6CEE024AFD7D300C738BD /* ANavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = A9A6CEDF24AFD7D300C738BD /* ANavigationController.m */; }; 29 | A9A6CEE824B0373C00C738BD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A9A6CEE724B0373C00C738BD /* LaunchScreen.storyboard */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | A99EA5C724B29F0E007744F1 /* ARMv8.6a.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ARMv8.6a.json; sourceTree = ""; }; 34 | A99EA5C824B29F0E007744F1 /* ARMv8.6a (32-bit).json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "ARMv8.6a (32-bit).json"; sourceTree = ""; }; 35 | A99EA5CB24B2A51B007744F1 /* AArchitectureViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AArchitectureViewController.h; sourceTree = ""; }; 36 | A99EA5CC24B2A51B007744F1 /* AArchitectureViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AArchitectureViewController.m; sourceTree = ""; }; 37 | A99EA5CF24BE70C0007744F1 /* ACollectionReusableHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ACollectionReusableHeaderView.h; sourceTree = ""; }; 38 | A99EA5D024BE70C0007744F1 /* ACollectionReusableHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ACollectionReusableHeaderView.m; sourceTree = ""; }; 39 | A99EA5D224BE7411007744F1 /* AInstructions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AInstructions.h; sourceTree = ""; }; 40 | A99EA5D324BE7411007744F1 /* AInstructions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AInstructions.m; sourceTree = ""; }; 41 | A99EA5D524BE94F0007744F1 /* NSString+A.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSString+A.h"; sourceTree = ""; }; 42 | A99EA5D624BE94F0007744F1 /* NSString+A.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSString+A.m"; sourceTree = ""; }; 43 | A9A6CE8D24A9354F00C738BD /* ARMRef.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ARMRef.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | A9A6CE9024A9354F00C738BD /* AAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AAppDelegate.h; sourceTree = ""; }; 45 | A9A6CE9124A9354F00C738BD /* AAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AAppDelegate.m; sourceTree = ""; }; 46 | A9A6CE9624A9354F00C738BD /* AMainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AMainViewController.h; sourceTree = ""; }; 47 | A9A6CE9724A9354F00C738BD /* AMainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMainViewController.m; sourceTree = ""; }; 48 | A9A6CE9C24A9355000C738BD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | A9A6CEA124A9355000C738BD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | A9A6CEA224A9355000C738BD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 51 | A9A6CEAE24A9469300C738BD /* AInstruction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AInstruction.h; sourceTree = ""; }; 52 | A9A6CEAF24A9469300C738BD /* AInstruction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AInstruction.m; sourceTree = ""; }; 53 | A9A6CEB124A946D900C738BD /* AInstructionLoader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AInstructionLoader.h; sourceTree = ""; }; 54 | A9A6CEB224A946D900C738BD /* AInstructionLoader.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AInstructionLoader.m; sourceTree = ""; }; 55 | A9A6CEB624A94F4500C738BD /* ACollectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ACollectionView.h; sourceTree = ""; }; 56 | A9A6CEB724A94F4500C738BD /* ACollectionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ACollectionView.m; sourceTree = ""; }; 57 | A9A6CEB924A94FF000C738BD /* ACollectionViewDataHandle.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ACollectionViewDataHandle.h; sourceTree = ""; }; 58 | A9A6CEBA24A94FF000C738BD /* ACollectionViewDataHandle.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ACollectionViewDataHandle.m; sourceTree = ""; }; 59 | A9A6CEBC24A950DA00C738BD /* ACollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ACollectionViewCell.h; sourceTree = ""; }; 60 | A9A6CEBD24A950DA00C738BD /* ACollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ACollectionViewCell.m; sourceTree = ""; }; 61 | A9A6CEC024A95B3D00C738BD /* WebKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WebKit.framework; path = System/Library/Frameworks/WebKit.framework; sourceTree = SDKROOT; }; 62 | A9A6CED424AF9CD900C738BD /* AInstructionViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AInstructionViewController.h; sourceTree = ""; }; 63 | A9A6CED524AF9CD900C738BD /* AInstructionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AInstructionViewController.m; sourceTree = ""; }; 64 | A9A6CED824AFA18100C738BD /* UIColor+A.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UIColor+A.h"; sourceTree = ""; }; 65 | A9A6CED924AFA18100C738BD /* UIColor+A.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "UIColor+A.m"; sourceTree = ""; }; 66 | A9A6CEDB24AFA7A200C738BD /* AInstructionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AInstructionView.h; sourceTree = ""; }; 67 | A9A6CEDC24AFA7A200C738BD /* AInstructionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AInstructionView.m; sourceTree = ""; }; 68 | A9A6CEDE24AFD7D300C738BD /* ANavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ANavigationController.h; sourceTree = ""; }; 69 | A9A6CEDF24AFD7D300C738BD /* ANavigationController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ANavigationController.m; sourceTree = ""; }; 70 | A9A6CEE124AFE3C800C738BD /* Defines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Defines.h; sourceTree = ""; }; 71 | A9A6CEE224AFE40500C738BD /* PrefixHeader.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrefixHeader.pch; sourceTree = ""; }; 72 | A9A6CEE324AFF10000C738BD /* ARM64.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = ARM64.entitlements; sourceTree = ""; }; 73 | A9A6CEE724B0373C00C738BD /* LaunchScreen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | A9A6CE8A24A9354F00C738BD /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | /* End PBXFrameworksBuildPhase section */ 85 | 86 | /* Begin PBXGroup section */ 87 | A99EA5CE24B2A520007744F1 /* Architecture */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | A99EA5CB24B2A51B007744F1 /* AArchitectureViewController.h */, 91 | A99EA5CC24B2A51B007744F1 /* AArchitectureViewController.m */, 92 | ); 93 | path = Architecture; 94 | sourceTree = ""; 95 | }; 96 | A9A6CE8424A9354F00C738BD = { 97 | isa = PBXGroup; 98 | children = ( 99 | A9A6CE8F24A9354F00C738BD /* ARMRef */, 100 | A9A6CE8E24A9354F00C738BD /* Products */, 101 | A9A6CEBF24A95B3D00C738BD /* Frameworks */, 102 | ); 103 | sourceTree = ""; 104 | }; 105 | A9A6CE8E24A9354F00C738BD /* Products */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | A9A6CE8D24A9354F00C738BD /* ARMRef.app */, 109 | ); 110 | name = Products; 111 | sourceTree = ""; 112 | }; 113 | A9A6CE8F24A9354F00C738BD /* ARMRef */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | A9A6CEA924A9367500C738BD /* Source */, 117 | A9A6CEAB24A936BC00C738BD /* Resource */, 118 | ); 119 | path = ARMRef; 120 | sourceTree = ""; 121 | }; 122 | A9A6CEA924A9367500C738BD /* Source */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | A9A6CEA224A9355000C738BD /* main.m */, 126 | A9A6CEE124AFE3C800C738BD /* Defines.h */, 127 | A9A6CEE224AFE40500C738BD /* PrefixHeader.pch */, 128 | A9A6CE9024A9354F00C738BD /* AAppDelegate.h */, 129 | A9A6CE9124A9354F00C738BD /* AAppDelegate.m */, 130 | A99EA5CE24B2A520007744F1 /* Architecture */, 131 | A9A6CED724AFA16000C738BD /* Categories */, 132 | A9A6CEB524A94F2D00C738BD /* CollectionView */, 133 | A9A6CEAA24A9367D00C738BD /* Main */, 134 | A9A6CED324AF9CD900C738BD /* Instruction */, 135 | A9A6CEAD24A9467B00C738BD /* InstructionLoader */, 136 | ); 137 | path = Source; 138 | sourceTree = ""; 139 | }; 140 | A9A6CEAA24A9367D00C738BD /* Main */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | A9A6CE9624A9354F00C738BD /* AMainViewController.h */, 144 | A9A6CE9724A9354F00C738BD /* AMainViewController.m */, 145 | A9A6CEDE24AFD7D300C738BD /* ANavigationController.h */, 146 | A9A6CEDF24AFD7D300C738BD /* ANavigationController.m */, 147 | ); 148 | path = Main; 149 | sourceTree = ""; 150 | }; 151 | A9A6CEAB24A936BC00C738BD /* Resource */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | A9A6CEE724B0373C00C738BD /* LaunchScreen.storyboard */, 155 | A9A6CEE324AFF10000C738BD /* ARM64.entitlements */, 156 | A9A6CE9C24A9355000C738BD /* Assets.xcassets */, 157 | A9A6CEA124A9355000C738BD /* Info.plist */, 158 | A9A6CEE424AFF6CB00C738BD /* References */, 159 | ); 160 | path = Resource; 161 | sourceTree = ""; 162 | }; 163 | A9A6CEAD24A9467B00C738BD /* InstructionLoader */ = { 164 | isa = PBXGroup; 165 | children = ( 166 | A9A6CEAE24A9469300C738BD /* AInstruction.h */, 167 | A9A6CEAF24A9469300C738BD /* AInstruction.m */, 168 | A9A6CEB124A946D900C738BD /* AInstructionLoader.h */, 169 | A9A6CEB224A946D900C738BD /* AInstructionLoader.m */, 170 | A99EA5D224BE7411007744F1 /* AInstructions.h */, 171 | A99EA5D324BE7411007744F1 /* AInstructions.m */, 172 | ); 173 | path = InstructionLoader; 174 | sourceTree = ""; 175 | }; 176 | A9A6CEB524A94F2D00C738BD /* CollectionView */ = { 177 | isa = PBXGroup; 178 | children = ( 179 | A99EA5CF24BE70C0007744F1 /* ACollectionReusableHeaderView.h */, 180 | A99EA5D024BE70C0007744F1 /* ACollectionReusableHeaderView.m */, 181 | A9A6CEB624A94F4500C738BD /* ACollectionView.h */, 182 | A9A6CEB724A94F4500C738BD /* ACollectionView.m */, 183 | A9A6CEBC24A950DA00C738BD /* ACollectionViewCell.h */, 184 | A9A6CEBD24A950DA00C738BD /* ACollectionViewCell.m */, 185 | A9A6CEB924A94FF000C738BD /* ACollectionViewDataHandle.h */, 186 | A9A6CEBA24A94FF000C738BD /* ACollectionViewDataHandle.m */, 187 | ); 188 | path = CollectionView; 189 | sourceTree = ""; 190 | }; 191 | A9A6CEBF24A95B3D00C738BD /* Frameworks */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | A9A6CEC024A95B3D00C738BD /* WebKit.framework */, 195 | ); 196 | name = Frameworks; 197 | sourceTree = ""; 198 | }; 199 | A9A6CED324AF9CD900C738BD /* Instruction */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | A9A6CEDB24AFA7A200C738BD /* AInstructionView.h */, 203 | A9A6CEDC24AFA7A200C738BD /* AInstructionView.m */, 204 | A9A6CED424AF9CD900C738BD /* AInstructionViewController.h */, 205 | A9A6CED524AF9CD900C738BD /* AInstructionViewController.m */, 206 | ); 207 | path = "Instruction "; 208 | sourceTree = ""; 209 | }; 210 | A9A6CED724AFA16000C738BD /* Categories */ = { 211 | isa = PBXGroup; 212 | children = ( 213 | A9A6CED824AFA18100C738BD /* UIColor+A.h */, 214 | A9A6CED924AFA18100C738BD /* UIColor+A.m */, 215 | A99EA5D524BE94F0007744F1 /* NSString+A.h */, 216 | A99EA5D624BE94F0007744F1 /* NSString+A.m */, 217 | ); 218 | path = Categories; 219 | sourceTree = ""; 220 | }; 221 | A9A6CEE424AFF6CB00C738BD /* References */ = { 222 | isa = PBXGroup; 223 | children = ( 224 | A99EA5C724B29F0E007744F1 /* ARMv8.6a.json */, 225 | A99EA5C824B29F0E007744F1 /* ARMv8.6a (32-bit).json */, 226 | ); 227 | path = References; 228 | sourceTree = ""; 229 | }; 230 | /* End PBXGroup section */ 231 | 232 | /* Begin PBXNativeTarget section */ 233 | A9A6CE8C24A9354F00C738BD /* ARMRef */ = { 234 | isa = PBXNativeTarget; 235 | buildConfigurationList = A9A6CEA624A9355000C738BD /* Build configuration list for PBXNativeTarget "ARMRef" */; 236 | buildPhases = ( 237 | A9A6CE8924A9354F00C738BD /* Sources */, 238 | A9A6CE8A24A9354F00C738BD /* Frameworks */, 239 | A9A6CE8B24A9354F00C738BD /* Resources */, 240 | ); 241 | buildRules = ( 242 | ); 243 | dependencies = ( 244 | ); 245 | name = ARMRef; 246 | productName = ARM64; 247 | productReference = A9A6CE8D24A9354F00C738BD /* ARMRef.app */; 248 | productType = "com.apple.product-type.application"; 249 | }; 250 | /* End PBXNativeTarget section */ 251 | 252 | /* Begin PBXProject section */ 253 | A9A6CE8524A9354F00C738BD /* Project object */ = { 254 | isa = PBXProject; 255 | attributes = { 256 | CLASSPREFIX = A; 257 | LastUpgradeCheck = 1150; 258 | ORGANIZATIONNAME = EvilPenguin; 259 | TargetAttributes = { 260 | A9A6CE8C24A9354F00C738BD = { 261 | CreatedOnToolsVersion = 11.5; 262 | }; 263 | }; 264 | }; 265 | buildConfigurationList = A9A6CE8824A9354F00C738BD /* Build configuration list for PBXProject "ARMRef" */; 266 | compatibilityVersion = "Xcode 9.3"; 267 | developmentRegion = en; 268 | hasScannedForEncodings = 0; 269 | knownRegions = ( 270 | en, 271 | Base, 272 | ); 273 | mainGroup = A9A6CE8424A9354F00C738BD; 274 | productRefGroup = A9A6CE8E24A9354F00C738BD /* Products */; 275 | projectDirPath = ""; 276 | projectRoot = ""; 277 | targets = ( 278 | A9A6CE8C24A9354F00C738BD /* ARMRef */, 279 | ); 280 | }; 281 | /* End PBXProject section */ 282 | 283 | /* Begin PBXResourcesBuildPhase section */ 284 | A9A6CE8B24A9354F00C738BD /* Resources */ = { 285 | isa = PBXResourcesBuildPhase; 286 | buildActionMask = 2147483647; 287 | files = ( 288 | A99EA5CA24B29F0E007744F1 /* ARMv8.6a (32-bit).json in Resources */, 289 | A99EA5C924B29F0E007744F1 /* ARMv8.6a.json in Resources */, 290 | A9A6CEE824B0373C00C738BD /* LaunchScreen.storyboard in Resources */, 291 | A9A6CE9D24A9355000C738BD /* Assets.xcassets in Resources */, 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | }; 295 | /* End PBXResourcesBuildPhase section */ 296 | 297 | /* Begin PBXSourcesBuildPhase section */ 298 | A9A6CE8924A9354F00C738BD /* Sources */ = { 299 | isa = PBXSourcesBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | A9A6CEDA24AFA18100C738BD /* UIColor+A.m in Sources */, 303 | A99EA5D424BE7411007744F1 /* AInstructions.m in Sources */, 304 | A9A6CEBE24A950DA00C738BD /* ACollectionViewCell.m in Sources */, 305 | A9A6CEB024A9469300C738BD /* AInstruction.m in Sources */, 306 | A9A6CEE024AFD7D300C738BD /* ANavigationController.m in Sources */, 307 | A9A6CE9824A9354F00C738BD /* AMainViewController.m in Sources */, 308 | A99EA5CD24B2A51B007744F1 /* AArchitectureViewController.m in Sources */, 309 | A9A6CEB824A94F4500C738BD /* ACollectionView.m in Sources */, 310 | A9A6CE9224A9354F00C738BD /* AAppDelegate.m in Sources */, 311 | A99EA5D124BE70C0007744F1 /* ACollectionReusableHeaderView.m in Sources */, 312 | A9A6CEBB24A94FF000C738BD /* ACollectionViewDataHandle.m in Sources */, 313 | A99EA5D724BE94F0007744F1 /* NSString+A.m in Sources */, 314 | A9A6CED624AF9CD900C738BD /* AInstructionViewController.m in Sources */, 315 | A9A6CEDD24AFA7A200C738BD /* AInstructionView.m in Sources */, 316 | A9A6CEA324A9355000C738BD /* main.m in Sources */, 317 | A9A6CEB324A946D900C738BD /* AInstructionLoader.m in Sources */, 318 | ); 319 | runOnlyForDeploymentPostprocessing = 0; 320 | }; 321 | /* End PBXSourcesBuildPhase section */ 322 | 323 | /* Begin XCBuildConfiguration section */ 324 | A9A6CEA424A9355000C738BD /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | buildSettings = { 327 | ALWAYS_SEARCH_USER_PATHS = NO; 328 | CLANG_ANALYZER_NONNULL = YES; 329 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 330 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 331 | CLANG_CXX_LIBRARY = "libc++"; 332 | CLANG_ENABLE_MODULES = YES; 333 | CLANG_ENABLE_OBJC_ARC = YES; 334 | CLANG_ENABLE_OBJC_WEAK = YES; 335 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 336 | CLANG_WARN_BOOL_CONVERSION = YES; 337 | CLANG_WARN_COMMA = YES; 338 | CLANG_WARN_CONSTANT_CONVERSION = YES; 339 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 341 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 342 | CLANG_WARN_EMPTY_BODY = YES; 343 | CLANG_WARN_ENUM_CONVERSION = YES; 344 | CLANG_WARN_INFINITE_RECURSION = YES; 345 | CLANG_WARN_INT_CONVERSION = YES; 346 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 347 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 348 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 349 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 350 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 351 | CLANG_WARN_STRICT_PROTOTYPES = YES; 352 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 353 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 354 | CLANG_WARN_UNREACHABLE_CODE = YES; 355 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 356 | COPY_PHASE_STRIP = NO; 357 | DEBUG_INFORMATION_FORMAT = dwarf; 358 | ENABLE_STRICT_OBJC_MSGSEND = YES; 359 | ENABLE_TESTABILITY = YES; 360 | GCC_C_LANGUAGE_STANDARD = gnu11; 361 | GCC_DYNAMIC_NO_PIC = NO; 362 | GCC_NO_COMMON_BLOCKS = YES; 363 | GCC_OPTIMIZATION_LEVEL = 0; 364 | GCC_PREPROCESSOR_DEFINITIONS = ( 365 | "DEBUG=1", 366 | "$(inherited)", 367 | ); 368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 370 | GCC_WARN_UNDECLARED_SELECTOR = YES; 371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 372 | GCC_WARN_UNUSED_FUNCTION = YES; 373 | GCC_WARN_UNUSED_VARIABLE = YES; 374 | IPHONEOS_DEPLOYMENT_TARGET = 13.5; 375 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 376 | MTL_FAST_MATH = YES; 377 | ONLY_ACTIVE_ARCH = YES; 378 | SDKROOT = iphoneos; 379 | }; 380 | name = Debug; 381 | }; 382 | A9A6CEA524A9355000C738BD /* Release */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ALWAYS_SEARCH_USER_PATHS = NO; 386 | CLANG_ANALYZER_NONNULL = YES; 387 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 388 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 389 | CLANG_CXX_LIBRARY = "libc++"; 390 | CLANG_ENABLE_MODULES = YES; 391 | CLANG_ENABLE_OBJC_ARC = YES; 392 | CLANG_ENABLE_OBJC_WEAK = YES; 393 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 394 | CLANG_WARN_BOOL_CONVERSION = YES; 395 | CLANG_WARN_COMMA = YES; 396 | CLANG_WARN_CONSTANT_CONVERSION = YES; 397 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 398 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 399 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 400 | CLANG_WARN_EMPTY_BODY = YES; 401 | CLANG_WARN_ENUM_CONVERSION = YES; 402 | CLANG_WARN_INFINITE_RECURSION = YES; 403 | CLANG_WARN_INT_CONVERSION = YES; 404 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 405 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 406 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 407 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 408 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 409 | CLANG_WARN_STRICT_PROTOTYPES = YES; 410 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 411 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 412 | CLANG_WARN_UNREACHABLE_CODE = YES; 413 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 414 | COPY_PHASE_STRIP = NO; 415 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 416 | ENABLE_NS_ASSERTIONS = NO; 417 | ENABLE_STRICT_OBJC_MSGSEND = YES; 418 | GCC_C_LANGUAGE_STANDARD = gnu11; 419 | GCC_NO_COMMON_BLOCKS = YES; 420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 422 | GCC_WARN_UNDECLARED_SELECTOR = YES; 423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 424 | GCC_WARN_UNUSED_FUNCTION = YES; 425 | GCC_WARN_UNUSED_VARIABLE = YES; 426 | IPHONEOS_DEPLOYMENT_TARGET = 13.5; 427 | MTL_ENABLE_DEBUG_INFO = NO; 428 | MTL_FAST_MATH = YES; 429 | SDKROOT = iphoneos; 430 | VALIDATE_PRODUCT = YES; 431 | }; 432 | name = Release; 433 | }; 434 | A9A6CEA724A9355000C738BD /* Debug */ = { 435 | isa = XCBuildConfiguration; 436 | buildSettings = { 437 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 438 | CODE_SIGN_ENTITLEMENTS = ARMRef/Resource/ARM64.entitlements; 439 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; 440 | CODE_SIGN_STYLE = Automatic; 441 | DEVELOPMENT_TEAM = ""; 442 | GCC_PREFIX_HEADER = "$(SRCROOT)/ARMRef/Source/PrefixHeader.pch"; 443 | INFOPLIST_FILE = ARMRef/Resource/Info.plist; 444 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 445 | LD_RUNPATH_SEARCH_PATHS = ( 446 | "$(inherited)", 447 | "@executable_path/Frameworks", 448 | ); 449 | MARKETING_VERSION = 0.3.1; 450 | PRODUCT_BUNDLE_IDENTIFIER = com.EvilPenguin.armref; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | SUPPORTS_MACCATALYST = YES; 453 | TARGETED_DEVICE_FAMILY = "1,2"; 454 | }; 455 | name = Debug; 456 | }; 457 | A9A6CEA824A9355000C738BD /* Release */ = { 458 | isa = XCBuildConfiguration; 459 | buildSettings = { 460 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 461 | CODE_SIGN_ENTITLEMENTS = ARMRef/Resource/ARM64.entitlements; 462 | "CODE_SIGN_IDENTITY[sdk=macosx*]" = "-"; 463 | CODE_SIGN_STYLE = Automatic; 464 | DEVELOPMENT_TEAM = ""; 465 | GCC_PREFIX_HEADER = "$(SRCROOT)/ARMRef/Source/PrefixHeader.pch"; 466 | INFOPLIST_FILE = ARMRef/Resource/Info.plist; 467 | IPHONEOS_DEPLOYMENT_TARGET = 13.0; 468 | LD_RUNPATH_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "@executable_path/Frameworks", 471 | ); 472 | MARKETING_VERSION = 0.3.1; 473 | PRODUCT_BUNDLE_IDENTIFIER = com.EvilPenguin.armref; 474 | PRODUCT_NAME = "$(TARGET_NAME)"; 475 | SUPPORTS_MACCATALYST = YES; 476 | TARGETED_DEVICE_FAMILY = "1,2"; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | A9A6CE8824A9354F00C738BD /* Build configuration list for PBXProject "ARMRef" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | A9A6CEA424A9355000C738BD /* Debug */, 487 | A9A6CEA524A9355000C738BD /* Release */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | A9A6CEA624A9355000C738BD /* Build configuration list for PBXNativeTarget "ARMRef" */ = { 493 | isa = XCConfigurationList; 494 | buildConfigurations = ( 495 | A9A6CEA724A9355000C738BD /* Debug */, 496 | A9A6CEA824A9355000C738BD /* Release */, 497 | ); 498 | defaultConfigurationIsVisible = 0; 499 | defaultConfigurationName = Release; 500 | }; 501 | /* End XCConfigurationList section */ 502 | }; 503 | rootObject = A9A6CE8524A9354F00C738BD /* Project object */; 504 | } 505 | -------------------------------------------------------------------------------- /ARMRef/ARMRef.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ARMRef/ARMRef.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ARMRef/ARMRef.xcodeproj/xcshareddata/xcschemes/ARMRef.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 45 | 51 | 52 | 53 | 54 | 60 | 62 | 68 | 69 | 70 | 71 | 73 | 74 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ARM64 4 | // 5 | // Created by evilpenguin on 6/28/20. 6 | // Copyright © 2020 EvilPenguin. All rights reserved. 7 | // 8 | 9 | #import "AAppDelegate.h" 10 | 11 | @interface AAppDelegate () 12 | 13 | @end 14 | 15 | @implementation AAppDelegate 16 | 17 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 18 | // Override point for customization after application launch. 19 | return YES; 20 | } 21 | @end 22 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/ARM64.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon_20pt@2x.png", 5 | "idiom" : "iphone", 6 | "scale" : "2x", 7 | "size" : "20x20" 8 | }, 9 | { 10 | "filename" : "icon_20pt@3x.png", 11 | "idiom" : "iphone", 12 | "scale" : "3x", 13 | "size" : "20x20" 14 | }, 15 | { 16 | "filename" : "icon_29pt@2x.png", 17 | "idiom" : "iphone", 18 | "scale" : "2x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "icon_29pt@3x.png", 23 | "idiom" : "iphone", 24 | "scale" : "3x", 25 | "size" : "29x29" 26 | }, 27 | { 28 | "filename" : "icon_40pt@2x.png", 29 | "idiom" : "iphone", 30 | "scale" : "2x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "filename" : "icon_40pt@3x.png", 35 | "idiom" : "iphone", 36 | "scale" : "3x", 37 | "size" : "40x40" 38 | }, 39 | { 40 | "filename" : "icon_60pt@2x.png", 41 | "idiom" : "iphone", 42 | "scale" : "2x", 43 | "size" : "60x60" 44 | }, 45 | { 46 | "filename" : "icon_60pt@3x.png", 47 | "idiom" : "iphone", 48 | "scale" : "3x", 49 | "size" : "60x60" 50 | }, 51 | { 52 | "filename" : "icon_20pt.png", 53 | "idiom" : "ipad", 54 | "scale" : "1x", 55 | "size" : "20x20" 56 | }, 57 | { 58 | "filename" : "icon_20pt@2x-1.png", 59 | "idiom" : "ipad", 60 | "scale" : "2x", 61 | "size" : "20x20" 62 | }, 63 | { 64 | "filename" : "icon_29pt.png", 65 | "idiom" : "ipad", 66 | "scale" : "1x", 67 | "size" : "29x29" 68 | }, 69 | { 70 | "filename" : "icon_29pt@2x-1.png", 71 | "idiom" : "ipad", 72 | "scale" : "2x", 73 | "size" : "29x29" 74 | }, 75 | { 76 | "filename" : "icon_40pt.png", 77 | "idiom" : "ipad", 78 | "scale" : "1x", 79 | "size" : "40x40" 80 | }, 81 | { 82 | "filename" : "icon_40pt@2x-1.png", 83 | "idiom" : "ipad", 84 | "scale" : "2x", 85 | "size" : "40x40" 86 | }, 87 | { 88 | "filename" : "icon_76pt.png", 89 | "idiom" : "ipad", 90 | "scale" : "1x", 91 | "size" : "76x76" 92 | }, 93 | { 94 | "filename" : "icon_76pt@2x.png", 95 | "idiom" : "ipad", 96 | "scale" : "2x", 97 | "size" : "76x76" 98 | }, 99 | { 100 | "filename" : "icon_83.5@2x.png", 101 | "idiom" : "ipad", 102 | "scale" : "2x", 103 | "size" : "83.5x83.5" 104 | }, 105 | { 106 | "filename" : "Icon@2x.png", 107 | "idiom" : "ios-marketing", 108 | "scale" : "1x", 109 | "size" : "1024x1024" 110 | } 111 | ], 112 | "info" : { 113 | "author" : "xcode", 114 | "version" : 1 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/Icon@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_20pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_20pt.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x-1.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_20pt@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_20pt@3x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_29pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_29pt.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x-1.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_29pt@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_29pt@3x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_40pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_40pt.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x-1.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_40pt@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_40pt@3x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_60pt@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_60pt@3x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_76pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_76pt.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_76pt@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/AppIcon.appiconset/icon_83.5@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/copyright.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "copyright@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "copyright@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/copyright.imageset/copyright@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/copyright.imageset/copyright@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/copyright.imageset/copyright@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/copyright.imageset/copyright@3x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/cpu.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "filename" : "cpu@2x.png", 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "filename" : "cpu@3x.png", 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "author" : "xcode", 20 | "version" : 1 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/cpu.imageset/cpu@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/cpu.imageset/cpu@2x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Assets.xcassets/cpu.imageset/cpu@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/ARMRef/ARMRef/Resource/Assets.xcassets/cpu.imageset/cpu@3x.png -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | $(MARKETING_VERSION) 19 | CFBundleVersion 20 | 1 21 | LSApplicationCategoryType 22 | public.app-category.reference 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarStyle 32 | UIStatusBarStyleDarkContent 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | UIInterfaceOrientationPortraitUpsideDown 39 | 40 | UISupportedInterfaceOrientations~ipad 41 | 42 | UIInterfaceOrientationPortrait 43 | UIInterfaceOrientationPortraitUpsideDown 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Resource/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/AAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | #import "ANavigationController.h" 26 | 27 | @class AMainViewController, AInstructionLoader; 28 | @interface AAppDelegate : UIResponder 29 | @property (nonatomic, strong) UIWindow *window; 30 | @property (nonatomic, strong) ANavigationController *navController; 31 | @property (nonatomic, strong) AInstructionLoader *loader; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/AAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "AAppDelegate.h" 26 | #import "AInstructionLoader.h" 27 | 28 | @implementation AAppDelegate 29 | 30 | #pragma mark - UIApplicationDelegate 31 | 32 | - (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 33 | [self.window makeKeyAndVisible]; 34 | 35 | return YES; 36 | } 37 | 38 | #pragma mark - Lazy props 39 | 40 | - (UIWindow *) window { 41 | if (!_window) { 42 | _window = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds]; 43 | _window.backgroundColor = [UIColor colorFromHex:0x333e48]; 44 | _window.rootViewController = self.navController; 45 | } 46 | 47 | return _window; 48 | } 49 | 50 | - (ANavigationController *) navController { 51 | if (!_navController) _navController = [[ANavigationController alloc] initWithLoader:self.loader]; 52 | 53 | return _navController; 54 | } 55 | 56 | - (AInstructionLoader *) loader { 57 | if (!_loader) _loader = [[AInstructionLoader alloc] init]; 58 | 59 | return _loader; 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Architecture/AArchitectureViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AArchitectureViewController.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @interface AArchitectureViewController : UITableViewController 29 | @property (nonatomic, copy, nullable) void (^pickCompletion)(NSString *arch); 30 | 31 | - (instancetype) initWithLoader:(AInstructionLoader *)loader; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Architecture/AArchitectureViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AArchitectureViewController.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | #import "AArchitectureViewController.h" 24 | 25 | @interface AArchitectureViewController () 26 | @property (nonatomic, weak) AInstructionLoader *loader; 27 | 28 | @end 29 | 30 | @implementation AArchitectureViewController 31 | 32 | #pragma mark - AArchitectureViewController 33 | 34 | - (instancetype) initWithLoader:(AInstructionLoader *)loader { 35 | if (self = [super initWithStyle:UITableViewStyleInsetGrouped]) { 36 | self.title = @"Architecture"; 37 | self.loader = loader; 38 | } 39 | 40 | return self; 41 | } 42 | 43 | - (void) viewDidLoad { 44 | [super viewDidLoad]; 45 | 46 | // Self 47 | self.view.backgroundColor = [UIColor colorFromHex:0x333e48]; 48 | 49 | // Table view 50 | self.tableView.delegate = self; 51 | self.tableView.dataSource = self; 52 | self.tableView.contentInset = UIEdgeInsetsMake(10.0f, 0.0f, 0.0f, 0.0f); 53 | self.tableView.separatorColor = [UIColor colorFromHex:0x333e48]; 54 | 55 | [self.tableView registerClass:UITableViewCell.class forCellReuseIdentifier:@"UITableViewCell"]; 56 | } 57 | 58 | #pragma mark - UITableViewDelegate 59 | 60 | - (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { 61 | NSString *arch = AInstructionLoader.supportedArchitecture[indexPath.row]; 62 | cell.textLabel.text = arch; 63 | 64 | if ([self.loader.architecture isEqualToString:arch]) { 65 | cell.accessoryType = UITableViewCellAccessoryCheckmark; 66 | } 67 | } 68 | 69 | - (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 70 | return 50.0f; 71 | } 72 | 73 | - (void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 74 | NSString *arch = AInstructionLoader.supportedArchitecture[indexPath.row]; 75 | 76 | if (![self.loader.architecture isEqualToString:arch]) { 77 | BlockSafetyCallWithArgs(self.pickCompletion, arch); 78 | 79 | [self.loader loadArchitecture:arch]; 80 | } 81 | 82 | [self.navigationController popViewControllerAnimated:YES]; 83 | } 84 | 85 | #pragma mark - UITableViewDataSource 86 | 87 | - (NSInteger) tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 88 | return AInstructionLoader.supportedArchitecture.count; 89 | } 90 | 91 | - (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 92 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell" forIndexPath:indexPath]; 93 | cell.backgroundColor = UIColor.whiteColor; 94 | cell.tintColor = self.view.backgroundColor; 95 | cell.textLabel.font = [UIFont systemFontOfSize:20.0f weight:UIFontWeightBold]; 96 | cell.textLabel.textColor = UIColor.blackColor; 97 | 98 | return cell; 99 | } 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Categories/NSString+A.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+A.h 3 | // ARMRef 4 | // 5 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @interface NSString (A) 30 | 31 | - (NSString *__nullable) firstCharacter; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Categories/NSString+A.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+A.m 3 | // ARMRef 4 | // 5 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "NSString+A.h" 26 | 27 | @implementation NSString (A) 28 | 29 | #pragma mark - Public methods 30 | 31 | - (NSString *) firstCharacter { 32 | if (self.length) { 33 | return [self substringToIndex:1].lowercaseString; 34 | } 35 | 36 | return nil; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Categories/UIColor+A.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+A.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @interface UIColor (A) 29 | 30 | + (instancetype) colorFromHex:(int64_t)hex; 31 | + (CGColorRef) cgColorFromhex:(int64_t)hex; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Categories/UIColor+A.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+A.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "UIColor+A.h" 25 | 26 | @implementation UIColor (A) 27 | 28 | #pragma mark - Public methods 29 | 30 | + (instancetype) colorFromHex:(int64_t)hex { 31 | return [UIColor colorWithRed:((CGFloat)((hex & 0xFF0000) >> 16)) / 255.0f 32 | green:((CGFloat)((hex & 0x00FF00) >> 8)) / 255.0f 33 | blue:((CGFloat)((hex & 0x0000FF) >> 0)) / 255.0f 34 | alpha:1.0]; 35 | } 36 | 37 | + (CGColorRef) cgColorFromhex:(int64_t)hex { 38 | return [[self colorFromHex:hex] CGColor]; 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/CollectionView/ACollectionReusableHeaderView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ACollectionReusableHeaderView.h 3 | // ARMRef 4 | // 5 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @interface ACollectionReusableHeaderView : UICollectionReusableView 30 | @property (nonatomic, readonly, class) NSString *identifier; 31 | @property (nonatomic, readonly) UILabel *label; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/CollectionView/ACollectionReusableHeaderView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ACollectionReusableHeaderView.m 3 | // ARMRef 4 | // 5 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "ACollectionReusableHeaderView.h" 26 | 27 | @interface ACollectionReusableHeaderView () 28 | @property (nonatomic, strong) UILabel *label; 29 | 30 | @end 31 | 32 | @implementation ACollectionReusableHeaderView 33 | 34 | #pragma mark - ACollectionReusableHeaderView 35 | 36 | - (instancetype) initWithFrame:(CGRect)frame { 37 | if (self = [super initWithFrame:frame]) { 38 | self.backgroundColor = [UIColor colorFromHex:0x5b646c]; 39 | 40 | [self addSubview:self.label]; 41 | } 42 | 43 | return self; 44 | } 45 | 46 | - (void) layoutSubviews { 47 | [super layoutSubviews]; 48 | 49 | // Label 50 | self.label.frame = CGRectMake(10.0f, 0.0f, self.bounds.size.width - 20.0f, self.bounds.size.height); 51 | } 52 | 53 | #pragma mark - Public class methods 54 | 55 | + (NSString *) identifier { 56 | return @"ACollectionReusableHeaderView"; 57 | } 58 | 59 | #pragma mark - Lazy props 60 | 61 | - (UILabel *) label { 62 | if (!_label) { 63 | _label = [[UILabel alloc] init]; 64 | _label.backgroundColor = UIColor.clearColor; 65 | _label.textColor = UIColor.whiteColor; 66 | _label.font = [UIFont systemFontOfSize:24.0f weight:UIFontWeightBold]; 67 | _label.text = @"A"; 68 | } 69 | 70 | return _label; 71 | } 72 | 73 | @end 74 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/CollectionView/ACollectionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ACollectionView.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @interface ACollectionView : UICollectionView 30 | 31 | @end 32 | 33 | NS_ASSUME_NONNULL_END 34 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/CollectionView/ACollectionView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ACollectionView.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "ACollectionView.h" 26 | #import "ACollectionViewCell.h" 27 | #import "ACollectionReusableHeaderView.h" 28 | 29 | @implementation ACollectionView 30 | 31 | #pragma mark - ACollectionView 32 | 33 | - (instancetype) init { 34 | if (self = [super initWithFrame:CGRectZero collectionViewLayout:ACollectionView._layout]) { 35 | self.backgroundColor = [UIColor colorFromHex:0x333e48]; 36 | self.scrollIndicatorInsets = UIEdgeInsetsMake(self.contentInset.top + 40.0f, self.contentInset.left, self.contentInset.bottom, self.contentInset.right); 37 | self.alwaysBounceVertical = YES; 38 | self.translatesAutoresizingMaskIntoConstraints = NO; 39 | 40 | [self registerClass:ACollectionViewCell.class forCellWithReuseIdentifier:ACollectionViewCell.identifier]; 41 | [self registerClass:ACollectionReusableHeaderView.class forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:ACollectionReusableHeaderView.identifier]; 42 | 43 | [NSNotificationCenter.defaultCenter addObserver:self 44 | selector:@selector(_keyboardWillChangeFrameNotification:) 45 | name:UIKeyboardWillChangeFrameNotification 46 | object:nil]; 47 | } 48 | 49 | return self; 50 | } 51 | 52 | #pragma mark - Private 53 | 54 | + (UICollectionViewFlowLayout *) _layout { 55 | UICollectionViewFlowLayout *layout = UICollectionViewFlowLayout.new; 56 | layout.scrollDirection = UICollectionViewScrollDirectionVertical; 57 | layout.sectionInsetReference = UICollectionViewFlowLayoutSectionInsetFromContentInset; 58 | layout.sectionHeadersPinToVisibleBounds = YES; 59 | 60 | return layout; 61 | } 62 | 63 | - (void) _keyboardWillChangeFrameNotification:(NSNotification *)notification { 64 | CGRect endKeyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; 65 | 66 | CGFloat bottomInset = (endKeyboardFrame.origin.y > self.bounds.size.height ? 10.0f : endKeyboardFrame.size.height + 10.0f); 67 | self.contentInset = UIEdgeInsetsMake(0.0f, 0.0f, bottomInset, 0.0f); 68 | self.scrollIndicatorInsets = UIEdgeInsetsMake(self.contentInset.top + 40.0f, self.contentInset.left, self.contentInset.bottom, self.contentInset.right); 69 | } 70 | 71 | @end 72 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/CollectionView/ACollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ACollectionViewCell.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @class AInstruction; 30 | @interface ACollectionViewCell : UICollectionViewCell 31 | @property (nonatomic, readonly, class) NSString *identifier; 32 | @property (nonatomic, weak) AInstruction *instruction; 33 | 34 | + (CGFloat) heightForInstruction:(AInstruction *)instruction withWidth:(CGFloat)width; 35 | 36 | @end 37 | 38 | NS_ASSUME_NONNULL_END 39 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/CollectionView/ACollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ACollectionViewCell.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "ACollectionViewCell.h" 26 | #import "AInstruction.h" 27 | 28 | @interface ACollectionViewCell () 29 | @property (nonatomic, strong) UILabel *topLabel; 30 | @property (nonatomic, strong) UILabel *bottomLabel; 31 | 32 | @end 33 | 34 | @implementation ACollectionViewCell 35 | @dynamic identifier; 36 | 37 | #pragma mark - ACollectionViewCell 38 | 39 | - (instancetype) initWithFrame:(CGRect)frame { 40 | if (self = [super initWithFrame:frame]) { 41 | self.backgroundColor = UIColor.whiteColor; 42 | self.layer.masksToBounds = YES; 43 | self.layer.cornerRadius = 10.0f; 44 | self.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner | kCALayerMinXMaxYCorner | kCALayerMaxXMaxYCorner; 45 | 46 | [self.contentView addSubview:self.topLabel]; 47 | [self.contentView addSubview:self.bottomLabel]; 48 | } 49 | 50 | return self; 51 | } 52 | 53 | - (void) layoutSubviews { 54 | [super layoutSubviews]; 55 | 56 | CGFloat width = self.bounds.size.width - 20.0f; 57 | 58 | // Top label 59 | CGRect topFrame = [self.class _topLabelFrameForString:self.topLabel.text withWidth:width]; 60 | self.topLabel.frame = CGRectMake(10.0f, 9.0f, topFrame.size.width, topFrame.size.height); 61 | 62 | // Bottom label 63 | CGRect bottomFrame = [self.class _bottomLabelFrameForString:self.bottomLabel.text withWidth:width]; 64 | self.bottomLabel.frame = CGRectMake(10.0f, CGRectGetMaxY(self.topLabel.frame), bottomFrame.size.width, bottomFrame.size.height); 65 | } 66 | 67 | - (void)drawRect:(CGRect)rect { 68 | [super drawRect:rect]; 69 | 70 | if (self.highlighted) { 71 | CGContextRef context = UIGraphicsGetCurrentContext(); 72 | CGContextSetRGBFillColor(context, 1, 0, 0, 1); 73 | CGContextFillRect(context, self.bounds); 74 | } 75 | } 76 | 77 | #pragma mark - Public class methods 78 | 79 | + (NSString *) identifier { 80 | return @"ACollectionViewCell"; 81 | } 82 | 83 | #pragma mark - Public methods 84 | 85 | + (CGFloat) heightForInstruction:(AInstruction *)instruction withWidth:(CGFloat)width { 86 | CGFloat padding = 18.0f; 87 | CGRect topFrame = [self _topLabelFrameForString:instruction.mnemonic withWidth:width]; 88 | CGRect bottomFrame = [self _bottomLabelFrameForString:instruction.shortDesc withWidth:width]; 89 | 90 | return topFrame.size.height + bottomFrame.size.height + padding; 91 | } 92 | 93 | #pragma mark - Private class 94 | 95 | + (CGRect) _topLabelFrameForString:(NSString *)string withWidth:(CGFloat)width { 96 | return [string boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) 97 | options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading 98 | attributes:self._topLabelAttributes 99 | context:nil]; 100 | } 101 | 102 | + (NSDictionary *) _topLabelAttributes { 103 | return @{ 104 | NSFontAttributeName: [UIFont systemFontOfSize:20.0f weight:UIFontWeightBold] 105 | }; 106 | } 107 | 108 | + (CGRect) _bottomLabelFrameForString:(NSString *)string withWidth:(CGFloat)width { 109 | return [string boundingRectWithSize:CGSizeMake(width, CGFLOAT_MAX) 110 | options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading 111 | attributes:self._bottomLabelAttributes 112 | context:nil]; 113 | } 114 | 115 | + (NSDictionary *) _bottomLabelAttributes { 116 | return @{ 117 | NSFontAttributeName: [UIFont systemFontOfSize:14.0f weight:UIFontWeightRegular] 118 | }; 119 | } 120 | 121 | #pragma mark - Setters 122 | 123 | - (void) setHighlighted:(BOOL)highlighted { 124 | [super setHighlighted:highlighted]; 125 | 126 | [self setNeedsDisplay]; 127 | } 128 | 129 | - (void) setInstruction:(AInstruction *)instruction { 130 | _instruction = instruction; 131 | 132 | self.topLabel.attributedText = [[NSAttributedString alloc] initWithString:instruction.mnemonic attributes:self.class._topLabelAttributes]; 133 | self.bottomLabel.attributedText = [[NSAttributedString alloc] initWithString:instruction.shortDesc attributes:self.class._bottomLabelAttributes]; 134 | 135 | [self setNeedsLayout]; 136 | } 137 | 138 | #pragma mark - Lazy props 139 | 140 | - (UILabel *) topLabel { 141 | if (!_topLabel) { 142 | _topLabel = [[UILabel alloc] init]; 143 | _topLabel.backgroundColor = UIColor.clearColor; 144 | _topLabel.textColor = UIColor.blackColor; 145 | _topLabel.numberOfLines = 2; 146 | } 147 | 148 | return _topLabel; 149 | } 150 | 151 | - (UILabel *) bottomLabel { 152 | if (!_bottomLabel) { 153 | _bottomLabel = [[UILabel alloc] init]; 154 | _bottomLabel.backgroundColor = UIColor.clearColor; 155 | _bottomLabel.textColor = UIColor.blackColor; 156 | _bottomLabel.numberOfLines = 0; 157 | _bottomLabel.lineBreakMode = NSLineBreakByWordWrapping; 158 | } 159 | 160 | return _bottomLabel; 161 | } 162 | 163 | @end 164 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/CollectionView/ACollectionViewDataHandle.h: -------------------------------------------------------------------------------- 1 | // 2 | // ACollectionViewDataHandle.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @class AInstructionLoader, AInstruction; 30 | @protocol ACollectionViewDelegatesTouchHandle; 31 | @interface ACollectionViewDataHandle : NSObject 32 | @property (nonatomic, weak) id handleTouch; 33 | @property (nonatomic, strong, nullable) AInstructions *instructions; 34 | 35 | @end 36 | 37 | @protocol ACollectionViewDelegatesTouchHandle 38 | @required 39 | - (void) collectioinViewHandle:(ACollectionViewDataHandle *)handle didTouchInstruction:(AInstruction *)instruction; 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/CollectionView/ACollectionViewDataHandle.m: -------------------------------------------------------------------------------- 1 | // 2 | // ACollectionViewDataHandle.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE.. 23 | 24 | 25 | #import "ACollectionViewDataHandle.h" 26 | #import "AInstructionLoader.h" 27 | #import "ACollectionViewCell.h" 28 | #import "ACollectionReusableHeaderView.h" 29 | 30 | @interface ACollectionViewDataHandle () 31 | 32 | @end 33 | 34 | @implementation ACollectionViewDataHandle 35 | 36 | #pragma mark - UICollectionViewDataSource 37 | 38 | - (nonnull __kindof UICollectionViewCell *) collectionView:(nonnull UICollectionView *)collectionView cellForItemAtIndexPath:(nonnull NSIndexPath *)indexPath { 39 | ACollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ACollectionViewCell.identifier forIndexPath:indexPath]; 40 | 41 | return cell; 42 | } 43 | 44 | - (NSInteger) numberOfSectionsInCollectionView:(UICollectionView *)collectionView { 45 | return self.instructions.count; 46 | } 47 | 48 | - (NSInteger) collectionView:(nonnull UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { 49 | NSString *key = safetyObjectAtIndex(self.instructions.allKeys, section); 50 | 51 | return [self.instructions[key] count]; 52 | } 53 | 54 | #pragma mark - UICollectionViewDelegate 55 | 56 | - (void) collectionView:(UICollectionView *)collectionView willDisplayCell:(ACollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath { 57 | cell.instruction = [self.instructions instructionAtIndexPath:indexPath]; 58 | } 59 | 60 | - (void) collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { 61 | AInstruction *instruction = [self.instructions instructionAtIndexPath:indexPath]; 62 | [self.handleTouch collectioinViewHandle:self didTouchInstruction:instruction]; 63 | } 64 | 65 | - (void) collectionView:(UICollectionView *)collectionView didHighlightItemAtIndexPath:(NSIndexPath *)indexPath { 66 | UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath]; 67 | cell.contentView.backgroundColor = [UIColor colorFromHex:0xadb1b5]; 68 | } 69 | 70 | - (void) collectionView:(UICollectionView *)collectionView didUnhighlightItemAtIndexPath:(NSIndexPath *)indexPath { 71 | UICollectionViewCell *cell = [collectionView cellForItemAtIndexPath:indexPath]; 72 | cell.contentView.backgroundColor = UIColor.whiteColor; 73 | } 74 | 75 | - (UICollectionReusableView *) collectionView:(UICollectionView *)collectionView viewForSupplementaryElementOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath { 76 | if (kind == UICollectionElementKindSectionHeader) { 77 | ACollectionReusableHeaderView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader 78 | withReuseIdentifier:ACollectionReusableHeaderView.identifier 79 | forIndexPath:indexPath]; 80 | headerView.label.text = [safetyObjectAtIndex(self.instructions.allKeys, indexPath.section) uppercaseString]; 81 | 82 | return headerView; 83 | } 84 | 85 | return nil; 86 | } 87 | 88 | #pragma mark - UICollectionViewDelegateFlowLayout 89 | 90 | - (CGSize) collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { 91 | AInstruction *instruction = [self.instructions instructionAtIndexPath:indexPath]; 92 | CGFloat maxSize = [ACollectionViewCell heightForInstruction:instruction 93 | withWidth:collectionView.bounds.size.width - 40.0f]; 94 | 95 | return CGSizeMake(collectionView.bounds.size.width - 20.0f, maxSize); 96 | } 97 | 98 | - (CGSize) collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout referenceSizeForHeaderInSection:(NSInteger)section { 99 | return CGSizeMake(collectionView.bounds.size.width, 40.0f); 100 | } 101 | 102 | - (UIEdgeInsets) collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout insetForSectionAtIndex:(NSInteger)section { 103 | return UIEdgeInsetsMake(10.0f, 10.0f, 10.0f, 10.0f); 104 | } 105 | 106 | - (CGFloat) collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section { 107 | return 10.0f; 108 | } 109 | 110 | - (CGFloat) collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section { 111 | return 0.0f; 112 | } 113 | 114 | @end 115 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Defines.h: -------------------------------------------------------------------------------- 1 | // 2 | // Defines.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #ifndef Defines_h 25 | #define Defines_h 26 | 27 | // Weakify and Strongify 28 | #define weakify(var) \ 29 | __weak typeof(var) KPWeak_##var = var 30 | 31 | #define strongify(var) \ 32 | _Pragma("clang diagnostic push") \ 33 | _Pragma("clang diagnostic ignored \"-Wshadow\"") \ 34 | __strong typeof(var) var = KPWeak_##var \ 35 | _Pragma("clang diagnostic pop") 36 | 37 | // Dispatch main 38 | #define dispatch_async_main(block) \ 39 | if (block) dispatch_async(dispatch_get_main_queue(), block) 40 | 41 | #define dispatch_async_global(block) \ 42 | if (block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block) 43 | 44 | // Block 45 | #define BlockSafetyCall(block) \ 46 | if (block) block() 47 | 48 | #define BlockSafetyCallWithArgs(block, ...) \ 49 | if (block) block(__VA_ARGS__) 50 | 51 | // Array 52 | #define safetyObjectAtIndex(array, index) \ 53 | ([array count] > index ? array[index] : nil) 54 | 55 | #define safetyPointerObjectAtIndex(array, index) \ 56 | ([array count] > index ? [array pointerAtIndex:index] : nil) 57 | 58 | 59 | #endif /* Defines_h */ 60 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Instruction /AInstructionView.h: -------------------------------------------------------------------------------- 1 | // 2 | // AInstructionView.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @class AInstruction; 29 | @interface AInstructionView : UIView 30 | @property (nonatomic, weak) AInstruction *instruction; 31 | 32 | @end 33 | 34 | NS_ASSUME_NONNULL_END 35 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Instruction /AInstructionView.m: -------------------------------------------------------------------------------- 1 | // 2 | // AInstructionView.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "AInstructionView.h" 25 | #import "AInstruction.h" 26 | 27 | @interface AInstructionView () 28 | @property (nonatomic, strong) UIScrollView *scrollView; 29 | 30 | @property (nonatomic, strong) UILabel *titleLabel; 31 | @property (nonatomic, strong) UILabel *descLabel; 32 | 33 | @property (nonatomic, strong) UILabel *syntaxSectionLabel; 34 | @property (nonatomic, strong) NSPointerArray *syntaxLabels; 35 | 36 | @property (nonatomic, strong) UILabel *symbolSectionLabel; 37 | @property (nonatomic, strong) NSPointerArray *symbolLabels; 38 | 39 | @property (nonatomic, strong) UILabel *decodeSectionLabel; 40 | @property (nonatomic, strong) UILabel *decodeLabel; 41 | 42 | @property (nonatomic, strong) UILabel *operationSectionLabel; 43 | @property (nonatomic, strong) UILabel *operationLabel; 44 | 45 | @end 46 | 47 | @implementation AInstructionView 48 | 49 | #pragma mark - AInstructionView 50 | 51 | - (instancetype) init { 52 | if (self = [super init]) { 53 | self.backgroundColor = UIColor.whiteColor; 54 | 55 | [self addSubview:self.scrollView]; 56 | //[self.scrollView addSubview:self.titleLabel]; 57 | [self.scrollView addSubview:self.descLabel]; 58 | [self.scrollView addSubview:self.syntaxSectionLabel]; 59 | [self.scrollView addSubview:self.symbolSectionLabel]; 60 | [self.scrollView addSubview:self.decodeSectionLabel]; 61 | [self.scrollView addSubview:self.decodeLabel]; 62 | [self.scrollView addSubview:self.operationSectionLabel]; 63 | [self.scrollView addSubview:self.operationLabel]; 64 | } 65 | 66 | return self; 67 | } 68 | 69 | - (void) layoutSubviews { 70 | [super layoutSubviews]; 71 | 72 | // Scrollview 73 | CGFloat leftRightInset = self.safeAreaInsets.left + self.safeAreaInsets.right; 74 | self.scrollView.frame = CGRectMake(self.safeAreaInsets.left, 0.0f, self.bounds.size.width - leftRightInset, self.bounds.size.height); 75 | 76 | // Points 77 | CGFloat headerIndent = 8.0f; 78 | CGFloat headerMaxWidth = self.scrollView.bounds.size.width - (headerIndent * 2.0f); 79 | CGFloat contentIndent = headerIndent * 2.5f; 80 | CGFloat contextMaxWidth = self.scrollView.bounds.size.width - (contentIndent * 2.0f); 81 | 82 | // Title label 83 | //CGSize titleSize = [self.titleLabel sizeThatFits:CGSizeMake(headerMaxWidth, CGFLOAT_MAX)]; 84 | //self.titleLabel.frame = CGRectMake(headerIndent, headerIndent, titleSize.width, titleSize.height); 85 | 86 | // Desc label 87 | CGSize descSize = [self.descLabel sizeThatFits:CGSizeMake(contextMaxWidth, CGFLOAT_MAX)]; 88 | self.descLabel.frame = CGRectMake(contentIndent, contentIndent, descSize.width, descSize.height); 89 | 90 | // Syntax section label 91 | CGSize syntaxSectionSize = [self.syntaxSectionLabel sizeThatFits:CGSizeMake(headerMaxWidth, CGFLOAT_MAX)]; 92 | self.syntaxSectionLabel.frame = CGRectMake(headerIndent, CGRectGetMaxY(self.descLabel.frame) + 10.0f, syntaxSectionSize.width, syntaxSectionSize.height); 93 | 94 | // Syntax labels 95 | CGFloat syntaxOffsetY = CGRectGetMaxY(self.syntaxSectionLabel.frame) + 5.0f; 96 | for (UILabel *syntaxLabel in self.syntaxLabels) { 97 | CGSize syntaxSize = [syntaxLabel sizeThatFits:CGSizeMake(contextMaxWidth, CGFLOAT_MAX)]; 98 | syntaxLabel.frame = CGRectMake(contentIndent, syntaxOffsetY, contextMaxWidth, syntaxSize.height + 4.0f); 99 | 100 | syntaxOffsetY = CGRectGetMaxY(syntaxLabel.frame) + 5.0f; 101 | } 102 | 103 | // Symbol section label 104 | CGSize symbolSectionSize = [self.symbolSectionLabel sizeThatFits:CGSizeMake(headerMaxWidth, CGFLOAT_MAX)]; 105 | self.symbolSectionLabel.frame = CGRectMake(headerIndent, syntaxOffsetY + 10.0f, symbolSectionSize.width, symbolSectionSize.height); 106 | 107 | // Syntax labels 108 | CGFloat symbolOffsetY = CGRectGetMaxY(self.symbolSectionLabel.frame) + 5.0f; 109 | for (UILabel *symbolLabel in self.symbolLabels) { 110 | CGSize syntaxSize = [symbolLabel sizeThatFits:CGSizeMake(contextMaxWidth, CGFLOAT_MAX)]; 111 | symbolLabel.frame = CGRectMake(contentIndent, symbolOffsetY, syntaxSize.width, syntaxSize.height + 4.0f); 112 | 113 | symbolOffsetY = CGRectGetMaxY(symbolLabel.frame) + 10.0f; 114 | } 115 | 116 | // Decode section label 117 | CGSize decodeSectionSize = [self.decodeSectionLabel sizeThatFits:CGSizeMake(headerMaxWidth, CGFLOAT_MAX)]; 118 | self.decodeSectionLabel.frame = CGRectMake(headerIndent, symbolOffsetY + 10.0f, decodeSectionSize.width, decodeSectionSize.height); 119 | 120 | // Decode label 121 | CGSize decodeSize = [self.decodeLabel sizeThatFits:CGSizeMake(contextMaxWidth, CGFLOAT_MAX)]; 122 | self.decodeLabel.frame = CGRectMake(contentIndent, CGRectGetMaxY(self.decodeSectionLabel.frame) + 10.0f, contextMaxWidth, decodeSize.height + 4.0f); 123 | 124 | // Operation section label 125 | CGSize operationSectionSize = [self.operationSectionLabel sizeThatFits:CGSizeMake(headerMaxWidth, CGFLOAT_MAX)]; 126 | self.operationSectionLabel.frame = CGRectMake(headerIndent, CGRectGetMaxY(self.decodeLabel.frame) + 10.0f, operationSectionSize.width, operationSectionSize.height); 127 | 128 | // Operation label 129 | CGSize operationSize = [self.operationLabel sizeThatFits:CGSizeMake(contextMaxWidth, CGFLOAT_MAX)]; 130 | self.operationLabel.frame = CGRectMake(contentIndent, CGRectGetMaxY(self.operationSectionLabel.frame) + 10.0f, contextMaxWidth, operationSize.height + 4.0f); 131 | 132 | // Scroll content size 133 | self.scrollView.contentSize = CGSizeMake(self.scrollView.bounds.size.width, CGRectGetMaxY(self.operationLabel.frame) + 10.0f); 134 | } 135 | 136 | #pragma mark - Setter 137 | 138 | - (void) setInstruction:(AInstruction *)instruction { 139 | _instruction = instruction; 140 | 141 | // Mnemonic 142 | //self.titleLabel.text = instruction.mnemonic; 143 | 144 | // Desc 145 | self.descLabel.text = instruction.fullDesc; 146 | 147 | // Syntax 148 | for (NSString *symbol in instruction.syntax) { 149 | UILabel *label = [self _syntaxLabelWithString:symbol]; 150 | [self.syntaxLabels addPointer:(__bridge void *)label]; 151 | } 152 | 153 | // Symbols 154 | for (NSString *symbol in instruction.symbols) { 155 | UILabel *label = [self _symbolLabelWithString:symbol]; 156 | [self.symbolLabels addPointer:(__bridge void *)label]; 157 | } 158 | 159 | // Decode 160 | self.decodeLabel.text = instruction.decode; 161 | 162 | // Operation 163 | self.operationLabel.text = instruction.operation; 164 | } 165 | 166 | #pragma mark - Private 167 | 168 | - (UILabel *) _syntaxLabelWithString:(NSString *)string { 169 | UILabel *label = [[UILabel alloc] init]; 170 | label.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightSemibold]; 171 | label.backgroundColor = [UIColor colorFromHex:0xe6e6e6]; 172 | label.textColor = [UIColor colorFromHex:0x333e48]; 173 | label.numberOfLines = 0; 174 | label.text = string; 175 | [self.scrollView addSubview:label]; 176 | 177 | return label; 178 | } 179 | 180 | - (UILabel *) _symbolLabelWithString:(NSString *)string { 181 | NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:string attributes:@{ 182 | NSForegroundColorAttributeName: [UIColor colorFromHex:0x333e48], 183 | NSFontAttributeName: [UIFont systemFontOfSize:16.0f weight:UIFontWeightSemibold], 184 | NSBackgroundColorAttributeName: [UIColor colorFromHex:0xe6e6e6] 185 | }]; 186 | 187 | NSRange newLine = [string rangeOfString:@"\n"]; 188 | NSDictionary *afterSymbolAttributes = @{ 189 | NSForegroundColorAttributeName: [UIColor colorFromHex:0x333e48], 190 | NSFontAttributeName: [UIFont systemFontOfSize:16.0f weight:UIFontWeightRegular], 191 | NSBackgroundColorAttributeName: UIColor.clearColor 192 | }; 193 | [attributedString setAttributes:afterSymbolAttributes range:NSMakeRange(newLine.location, string.length - newLine.location)]; 194 | 195 | UILabel *label = [[UILabel alloc] init]; 196 | label.backgroundColor = UIColor.clearColor; 197 | label.numberOfLines = 0; 198 | label.attributedText = attributedString; 199 | [self.scrollView addSubview:label]; 200 | 201 | return label; 202 | } 203 | 204 | #pragma mark - Lazy 205 | 206 | - (UIScrollView *) scrollView { 207 | if (!_scrollView) { 208 | _scrollView = [[UIScrollView alloc] initWithFrame:self.bounds]; 209 | _scrollView.backgroundColor = UIColor.clearColor; 210 | } 211 | 212 | return _scrollView; 213 | } 214 | 215 | - (UILabel *) titleLabel { 216 | if (!_titleLabel) { 217 | _titleLabel = [[UILabel alloc] init]; 218 | _titleLabel.font = [UIFont systemFontOfSize:35.0f weight:UIFontWeightSemibold]; 219 | _titleLabel.backgroundColor = UIColor.clearColor; 220 | _titleLabel.textColor = [UIColor colorFromHex:0x333e48]; 221 | } 222 | 223 | return _titleLabel; 224 | } 225 | 226 | - (UILabel *) descLabel { 227 | if (!_descLabel) { 228 | _descLabel = [[UILabel alloc] init]; 229 | _descLabel.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightRegular]; 230 | _descLabel.backgroundColor = UIColor.clearColor; 231 | _descLabel.textColor = [UIColor colorFromHex:0x333e48]; 232 | _descLabel.numberOfLines = 0; 233 | } 234 | 235 | return _descLabel; 236 | } 237 | 238 | - (UILabel *) syntaxSectionLabel { 239 | if (!_syntaxSectionLabel) { 240 | _syntaxSectionLabel = [[UILabel alloc] init]; 241 | _syntaxSectionLabel.font = [UIFont systemFontOfSize:22.0f weight:UIFontWeightMedium]; 242 | _syntaxSectionLabel.backgroundColor = UIColor.clearColor; 243 | _syntaxSectionLabel.textColor = [UIColor colorFromHex:0x333e48]; 244 | _syntaxSectionLabel.text = @"Syntax"; 245 | } 246 | 247 | return _syntaxSectionLabel; 248 | } 249 | 250 | - (NSPointerArray *) syntaxLabels { 251 | if (!_syntaxLabels) _syntaxLabels = [NSPointerArray pointerArrayWithOptions:NSPointerFunctionsWeakMemory]; 252 | 253 | return _syntaxLabels; 254 | } 255 | 256 | - (UILabel *) symbolSectionLabel { 257 | if (!_symbolSectionLabel) { 258 | _symbolSectionLabel = [[UILabel alloc] init]; 259 | _symbolSectionLabel.font = [UIFont systemFontOfSize:22.0f weight:UIFontWeightMedium]; 260 | _symbolSectionLabel.backgroundColor = UIColor.clearColor; 261 | _symbolSectionLabel.textColor = [UIColor colorFromHex:0x333e48]; 262 | _symbolSectionLabel.text = @"Symbols"; 263 | } 264 | 265 | return _symbolSectionLabel; 266 | } 267 | 268 | - (NSPointerArray *) symbolLabels { 269 | if (!_symbolLabels) _symbolLabels = [NSPointerArray pointerArrayWithOptions:NSPointerFunctionsWeakMemory]; 270 | 271 | return _symbolLabels; 272 | } 273 | 274 | - (UILabel *) decodeSectionLabel { 275 | if (!_decodeSectionLabel) { 276 | _decodeSectionLabel = [[UILabel alloc] init]; 277 | _decodeSectionLabel.font = [UIFont systemFontOfSize:22.0f weight:UIFontWeightMedium]; 278 | _decodeSectionLabel.backgroundColor = UIColor.clearColor; 279 | _decodeSectionLabel.textColor = [UIColor colorFromHex:0x333e48]; 280 | _decodeSectionLabel.text = @"Decode"; 281 | } 282 | 283 | return _decodeSectionLabel; 284 | } 285 | 286 | - (UILabel *) decodeLabel { 287 | if (!_decodeLabel) { 288 | _decodeLabel = [[UILabel alloc] init]; 289 | _decodeLabel.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightSemibold]; 290 | _decodeLabel.backgroundColor = [UIColor colorFromHex:0xe6e6e6]; 291 | _decodeLabel.textColor = [UIColor colorFromHex:0x333e48]; 292 | _decodeLabel.numberOfLines = 0; 293 | } 294 | 295 | return _decodeLabel; 296 | } 297 | 298 | - (UILabel *) operationSectionLabel { 299 | if (!_operationSectionLabel) { 300 | _operationSectionLabel = [[UILabel alloc] init]; 301 | _operationSectionLabel.font = [UIFont systemFontOfSize:22.0f weight:UIFontWeightMedium]; 302 | _operationSectionLabel.backgroundColor = UIColor.clearColor; 303 | _operationSectionLabel.textColor = [UIColor colorFromHex:0x333e48]; 304 | _operationSectionLabel.text = @"Operation"; 305 | } 306 | 307 | return _operationSectionLabel; 308 | } 309 | 310 | - (UILabel *) operationLabel { 311 | if (!_operationLabel) { 312 | _operationLabel = [[UILabel alloc] init]; 313 | _operationLabel.font = [UIFont systemFontOfSize:16.0f weight:UIFontWeightSemibold]; 314 | _operationLabel.backgroundColor = [UIColor colorFromHex:0xe6e6e6]; 315 | _operationLabel.textColor = [UIColor colorFromHex:0x333e48]; 316 | _operationLabel.numberOfLines = 0; 317 | } 318 | 319 | return _operationLabel; 320 | } 321 | 322 | @end 323 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Instruction /AInstructionViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AInstructionViewController.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @class AInstruction; 29 | @interface AInstructionViewController : UIViewController 30 | @property (nonatomic, weak) AInstruction *instruction; 31 | 32 | - (instancetype) init; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Instruction /AInstructionViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AInstructionViewController.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "AInstructionViewController.h" 25 | #import "AInstructionView.h" 26 | #import "AInstruction.h" 27 | 28 | @interface AInstructionViewController () 29 | 30 | @end 31 | 32 | @implementation AInstructionViewController 33 | 34 | #pragma mark - AInstructionViewController 35 | 36 | - (instancetype) init { 37 | if (self = [super init]) { 38 | self.modalPresentationStyle = UIModalPresentationPageSheet; 39 | } 40 | 41 | return self; 42 | } 43 | 44 | - (void) loadView { 45 | self.view = [[AInstructionView alloc] init]; 46 | } 47 | 48 | #pragma mark - Setters 49 | 50 | - (void) setInstruction:(AInstruction *)instruction { 51 | _instruction = instruction; 52 | 53 | self.title = instruction.mnemonic; 54 | ((AInstructionView *)self.view).instruction = instruction; 55 | } 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/InstructionLoader/AInstruction.h: -------------------------------------------------------------------------------- 1 | // 2 | // AInstruction.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @interface AInstruction : NSObject 30 | @property (nonatomic, strong) NSString *mnemonic; 31 | @property (nonatomic, strong) NSString *shortDesc; 32 | @property (nonatomic, strong) NSString *fullDesc; 33 | @property (nonatomic, strong) NSArray *syntax; 34 | @property (nonatomic, strong) NSArray *symbols; 35 | @property (nonatomic, strong) NSString *decode; 36 | @property (nonatomic, strong) NSString *operation; 37 | 38 | - (instancetype) initWithDictionary:(NSDictionary *)dictionary; 39 | 40 | @end 41 | 42 | NS_ASSUME_NONNULL_END 43 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/InstructionLoader/AInstruction.m: -------------------------------------------------------------------------------- 1 | // 2 | // AInstruction.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "AInstruction.h" 26 | @import ObjectiveC.runtime; 27 | 28 | @implementation AInstruction 29 | 30 | #pragma mark - AInstruction 31 | 32 | - (instancetype) initWithDictionary:(NSDictionary *)dictionary { 33 | if (self = [super init]) { 34 | self.mnemonic = dictionary[@"mnemonic"]; 35 | self.shortDesc = dictionary[@"short_desc"]; 36 | self.fullDesc = dictionary[@"full_desc"]; 37 | self.symbols = dictionary[@"symbols"]; 38 | self.syntax = dictionary[@"syntax"]; 39 | self.decode = dictionary[@"decode"]; 40 | self.operation = dictionary[@"operation"]; 41 | } 42 | 43 | return self;; 44 | } 45 | 46 | - (NSString *) description { 47 | NSMutableString *desc = super.description.mutableCopy; 48 | 49 | uint32_t propertyCount; 50 | objc_property_t *properties = class_copyPropertyList(self.class, &propertyCount); 51 | 52 | for (NSInteger i = 0; i < propertyCount; i++) { 53 | objc_property_t property = properties[i]; 54 | NSString *propName = [NSString stringWithUTF8String:property_getName(property)]; 55 | [desc appendFormat:@"%@: %@;\n", propName, [self valueForKey:propName]]; 56 | } 57 | 58 | return desc.copy; 59 | } 60 | 61 | #pragma mark - Setters 62 | 63 | - (void) setDecode:(NSString *)decode { 64 | _decode = decode; 65 | 66 | _decode = [_decode stringByReplacingOccurrencesOfString:@"; " withString:@";"]; 67 | _decode = [_decode stringByReplacingOccurrencesOfString:@";" withString:@";\n"]; 68 | _decode = [_decode stringByReplacingCharactersInRange:NSMakeRange(_decode.length - 1, 1) withString:@""]; 69 | } 70 | 71 | - (void) setOperation:(NSString *)operation { 72 | _operation = operation; 73 | 74 | _operation = [_operation stringByReplacingOccurrencesOfString:@"; " withString:@";"]; 75 | _operation = [_operation stringByReplacingOccurrencesOfString:@";" withString:@";\n"]; 76 | _operation = [_operation stringByReplacingCharactersInRange:NSMakeRange(_operation.length - 1, 1) withString:@""]; 77 | } 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/InstructionLoader/AInstructionLoader.h: -------------------------------------------------------------------------------- 1 | // 2 | // AInstructionLoader.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import 26 | #import "AInstruction.h" 27 | #import "AInstructions.h" 28 | 29 | NS_ASSUME_NONNULL_BEGIN 30 | 31 | FOUNDATION_EXTERN NSString *const AInstructionLoaderFinishedNotificaton; 32 | 33 | @interface AInstructionLoader : NSObject 34 | @property (nonatomic, strong, readonly) NSString *architecture; 35 | @property (nonatomic, strong, nullable) NSString *filerString; 36 | 37 | - (void) loadArchitecture:(NSString *)architecture; 38 | - (AInstructions *) instructions; 39 | + (NSArray *) supportedArchitecture; 40 | 41 | @end 42 | 43 | NS_ASSUME_NONNULL_END 44 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/InstructionLoader/AInstructionLoader.m: -------------------------------------------------------------------------------- 1 | // 2 | // AInstructionLoader.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "AInstructionLoader.h" 26 | #import "AInstruction.h" 27 | 28 | NSString *const AInstructionLoaderFinishedNotificaton = @"AInstructionLoaderFinishedNotificaton"; 29 | 30 | @interface AInstructionLoader () 31 | @property (nonatomic, strong) NSString *architecture; 32 | @property (nonatomic, strong) AInstructions *_instructions; 33 | 34 | @end 35 | 36 | @implementation AInstructionLoader 37 | 38 | - (instancetype) init { 39 | if (self = [super init]) { 40 | // Load 64bit first :) 41 | [self loadArchitecture:AInstructionLoader.supportedArchitecture.firstObject]; 42 | } 43 | 44 | return self; 45 | } 46 | 47 | #pragma mark - Public 48 | 49 | - (void) loadArchitecture:(NSString *)architecture { 50 | if (architecture.length) { 51 | self.architecture = architecture; 52 | 53 | [self _load]; 54 | } 55 | } 56 | 57 | #pragma mark - Public class 58 | 59 | + (NSArray *) supportedArchitecture { 60 | static dispatch_once_t onceToken; 61 | static NSArray *versions; 62 | 63 | dispatch_once(&onceToken, ^{ 64 | versions = @[ 65 | @"ARMv8.6a", 66 | @"ARMv8.6a (32-bit)" 67 | ]; 68 | }); 69 | 70 | return versions; 71 | } 72 | 73 | #pragma mark - Private 74 | 75 | - (void) _load { 76 | weakify(self); 77 | dispatch_async_global(^ { 78 | strongify(self); 79 | 80 | NSString *jsonFile = [NSBundle.mainBundle pathForResource:self.architecture ofType:@"json"]; 81 | if (jsonFile.length) { 82 | NSData *jsonData = [NSData dataWithContentsOfFile:jsonFile]; 83 | if (jsonData.length) { 84 | NSArray *instructions = [NSJSONSerialization JSONObjectWithData:jsonData options:0 error:nil]; 85 | if (instructions.count) { 86 | [self _parsedArrayToInstructiions:instructions]; 87 | 88 | // Notify 89 | dispatch_async_main(^{ 90 | [NSNotificationCenter.defaultCenter postNotificationName:AInstructionLoaderFinishedNotificaton object:nil]; 91 | }); 92 | } 93 | } 94 | } 95 | }); 96 | } 97 | 98 | #pragma mark - Getter 99 | 100 | - (AInstructions *) instructions { 101 | if (self.filerString.length) { 102 | NSString *firstChar = self.filerString.firstCharacter; 103 | NSArray *instructions = self._instructions[firstChar]; 104 | 105 | weakify(self); 106 | NSIndexSet *indices = [instructions indexesOfObjectsPassingTest:^BOOL(AInstruction * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 107 | strongify(self); 108 | return [obj.mnemonic rangeOfString:self.filerString options:NSCaseInsensitiveSearch].location != NSNotFound; 109 | }]; 110 | 111 | return [AInstructions dictionaryWithDictionary:@{firstChar: [instructions objectsAtIndexes:indices]}]; 112 | } 113 | 114 | return self._instructions; 115 | } 116 | 117 | #pragma mark - Lazy 118 | 119 | - (AInstructions *) _instructions { 120 | if (!__instructions) { 121 | __instructions = [[AInstructions alloc] init]; 122 | } 123 | 124 | return __instructions; 125 | } 126 | 127 | #pragma mark - Private 128 | 129 | - (void) _parsedArrayToInstructiions:(NSArray *)array { 130 | // Clear 131 | [self._instructions removeAllObjects]; 132 | 133 | // Create 134 | for (NSDictionary *instructionDict in array) { 135 | AInstruction *instruction = [[AInstruction alloc] initWithDictionary:instructionDict]; 136 | 137 | NSString *section = instruction.mnemonic.firstCharacter; 138 | if (section) { 139 | [self._instructions[section] addObject:instruction]; 140 | } 141 | } 142 | 143 | // Sort 144 | [self._instructions sort]; 145 | } 146 | 147 | @end 148 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/InstructionLoader/AInstructions.h: -------------------------------------------------------------------------------- 1 | // 2 | // AInstructions.h 3 | // ARMRef 4 | // 5 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import 26 | 27 | NS_ASSUME_NONNULL_BEGIN 28 | 29 | @interface AInstructions : NSMutableDictionary 30 | 31 | - (AInstruction *__nullable) instructionAtIndexPath:(NSIndexPath *)indexPath; 32 | - (void) sort; 33 | 34 | @end 35 | 36 | NS_ASSUME_NONNULL_END 37 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/InstructionLoader/AInstructions.m: -------------------------------------------------------------------------------- 1 | // 2 | // AInstructions.m 3 | // ARMRef 4 | // 5 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | #import "AInstructions.h" 26 | 27 | @interface AInstructions() 28 | @property (nonatomic, strong) NSMutableArray *keys; 29 | @property (nonatomic, strong) NSMutableDictionary *dict; 30 | 31 | @end 32 | 33 | @implementation AInstructions 34 | 35 | #pragma mark - AInstructions 36 | 37 | + (instancetype) dictionaryWithDictionary:(NSDictionary *)dict { 38 | AInstructions *instructions = [[AInstructions alloc] init]; 39 | [instructions.dict addEntriesFromDictionary:dict]; 40 | [instructions.keys addObjectsFromArray:dict.allKeys]; 41 | 42 | return instructions; 43 | } 44 | 45 | - (NSString *) description { 46 | return self.dict.description; 47 | } 48 | 49 | - (NSUInteger) count { 50 | return self.keys.count; 51 | } 52 | 53 | - (NSEnumerator *) keyEnumerator { 54 | return self.keys.objectEnumerator; 55 | } 56 | 57 | - (void) removeAllObjects { 58 | [self.dict removeAllObjects]; 59 | [self.keys removeAllObjects]; 60 | } 61 | 62 | - (void) removeObjectForKey:(id)key { 63 | [self.dict removeObjectForKey:key]; 64 | [self.keys removeObject:key]; 65 | } 66 | 67 | - (id) objectForKey:(id)key { 68 | return [self objectForKeyedSubscript:key]; 69 | } 70 | 71 | - (id) objectForKeyedSubscript:(id)key { 72 | // Check for array 73 | if (key) { 74 | id object = [self.dict objectForKeyedSubscript:key]; 75 | if (!object) { 76 | object = [NSMutableArray array]; 77 | 78 | // Add Array 79 | self.dict[key] = object; 80 | 81 | // Keys 82 | [self.keys addObject:key]; 83 | } 84 | 85 | return object; 86 | } 87 | 88 | return nil; 89 | } 90 | 91 | #pragma mark - Public 92 | 93 | - (AInstruction *__nullable) instructionAtIndexPath:(NSIndexPath *)indexPath { 94 | NSString *key = safetyObjectAtIndex(self.allKeys, indexPath.section); 95 | 96 | return safetyObjectAtIndex(self[key], indexPath.row); 97 | } 98 | 99 | - (void) sort { 100 | // Sort keys 101 | [self.keys sortUsingSelector:@selector(compare:)]; 102 | 103 | // Sory instructions 104 | for (NSString *key in self) { 105 | [self[key] sortUsingComparator:^NSComparisonResult(AInstruction *obj1, AInstruction *obj2) { 106 | return [obj1.mnemonic compare:obj2.mnemonic]; 107 | }]; 108 | } 109 | } 110 | 111 | #pragma mark - Lazy 112 | 113 | - (NSMutableArray *) keys { 114 | if (!_keys) { 115 | _keys = [NSMutableArray array]; 116 | } 117 | 118 | return _keys; 119 | } 120 | 121 | - (NSMutableDictionary *) dict { 122 | if (!_dict) { 123 | _dict = [NSMutableDictionary dictionary]; 124 | } 125 | 126 | return _dict; 127 | } 128 | 129 | @end 130 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Main/AMainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import 26 | 27 | @class AInstructionLoader; 28 | @interface AMainViewController : UIViewController 29 | 30 | - (instancetype) initWithLoader:(AInstructionLoader *)loader; 31 | 32 | @end 33 | 34 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Main/AMainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import "AMainViewController.h" 26 | #import "AInstructionLoader.h" 27 | #import "ACollectionView.h" 28 | #import "ACollectionViewDataHandle.h" 29 | #import "AInstructionViewController.h" 30 | #import "AArchitectureViewController.h" 31 | 32 | @interface AMainViewController () 33 | @property (nonatomic, weak) AInstructionLoader *loader; 34 | @property (nonatomic, strong) UISearchBar *searchBar; 35 | @property (nonatomic, strong) UILabel *noDataLabel; 36 | @property (nonatomic, strong) ACollectionView *collectionView; 37 | @property (nonatomic, strong) ACollectionViewDataHandle *collectionViewDataHandle; 38 | 39 | @end 40 | 41 | @implementation AMainViewController 42 | 43 | #pragma mark - AMainViewController 44 | 45 | - (instancetype) initWithLoader:(AInstructionLoader *)loader { 46 | if (self = [super init]) { 47 | self.loader = loader; 48 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Arch" style:UIBarButtonItemStylePlain target:self action:@selector(_changeArch:)]; 49 | 50 | [NSNotificationCenter.defaultCenter addObserver:self 51 | selector:@selector(_loaderNotification:) 52 | name:AInstructionLoaderFinishedNotificaton 53 | object:nil]; 54 | } 55 | 56 | return self; 57 | } 58 | 59 | - (void) viewDidLoad { 60 | [super viewDidLoad]; 61 | 62 | // Self 63 | self.view.backgroundColor = [UIColor colorFromHex:0x333e48]; 64 | 65 | // Serach 66 | [self.view addSubview:self.searchBar]; 67 | 68 | // No data 69 | [self.view addSubview:self.noDataLabel]; 70 | 71 | // Collection View 72 | [self.view addSubview:self.collectionView]; 73 | } 74 | 75 | - (void) viewWillLayoutSubviews { 76 | [super viewWillLayoutSubviews]; 77 | 78 | // Points 79 | CGFloat leftRightInset = self.view.safeAreaInsets.left + self.view.safeAreaInsets.right; 80 | 81 | // Search 82 | self.searchBar.frame = CGRectMake(0.0f, self.view.safeAreaInsets.top, self.view.bounds.size.width, 45.0f); 83 | 84 | // No Data 85 | self.noDataLabel.frame = self.view.bounds; 86 | 87 | // Collection view 88 | CGRect collectionViewFrame = CGRectMake(self.view.safeAreaInsets.left, 89 | CGRectGetMaxY(self.searchBar.frame), 90 | self.view.bounds.size.width - leftRightInset, 91 | self.view.bounds.size.height - (CGRectGetMaxY(self.searchBar.frame) + 5.0f)); 92 | 93 | self.collectionView.frame = collectionViewFrame; 94 | [self.collectionView.collectionViewLayout invalidateLayout]; 95 | } 96 | 97 | #pragma mark - Private 98 | 99 | - (void) _changeArch:(UIBarButtonItem *)item { 100 | AArchitectureViewController *viewController = [[AArchitectureViewController alloc] initWithLoader:self.loader]; 101 | 102 | weakify(self); 103 | viewController.pickCompletion = ^(NSString *arch) { 104 | strongify(self); 105 | 106 | [self _showNoDataStyle:YES]; 107 | }; 108 | 109 | [self.navigationController pushViewController:viewController animated:YES]; 110 | } 111 | 112 | - (void) _loaderNotification:(NSNotification *)notification { 113 | self.title = self.loader.architecture; 114 | [self _updateDataAndLoaderWithString:nil]; 115 | } 116 | 117 | - (void) _updateDataAndLoaderWithString:(NSString *)string { 118 | self.loader.filerString = string; 119 | 120 | self.collectionViewDataHandle.instructions = self.loader.instructions; 121 | [self.collectionView reloadData]; 122 | [self.collectionView setContentOffset:CGPointZero animated:NO]; 123 | 124 | [self _showNoDataStyle:!self.collectionViewDataHandle.instructions.count]; 125 | } 126 | 127 | - (void) _showNoDataStyle:(BOOL)show { 128 | self.title = (show ? nil : self.loader.architecture); 129 | self.noDataLabel.alpha = (show ? 1.0f : 0.0f); 130 | self.collectionView.alpha = (show ? 0.0f : 1.0f); 131 | } 132 | 133 | #pragma mark - Lazy 134 | 135 | - (UISearchBar *) searchBar { 136 | if (!_searchBar) { 137 | _searchBar = [[UISearchBar alloc] init]; 138 | _searchBar.backgroundColor = [UIColor colorFromHex:0x424C54]; 139 | _searchBar.backgroundImage = UIImage.new; 140 | _searchBar.backgroundImage = UIImage.new; 141 | _searchBar.tintColor = UIColor.whiteColor; 142 | _searchBar.barTintColor = UIColor.whiteColor; 143 | _searchBar.delegate = self; 144 | _searchBar.showsCancelButton = YES; 145 | _searchBar.searchTextField.backgroundColor = UIColor.whiteColor; 146 | _searchBar.searchTextField.tintColor = _searchBar.backgroundColor; 147 | _searchBar.searchTextField.textColor = _searchBar.backgroundColor; 148 | _searchBar.searchTextField.autocorrectionType = UITextAutocorrectionTypeNo; 149 | _searchBar.searchTextField.autocapitalizationType = UITextAutocapitalizationTypeNone; 150 | } 151 | 152 | return _searchBar; 153 | } 154 | 155 | - (UILabel *) noDataLabel { 156 | if (!_noDataLabel) { 157 | _noDataLabel = [[UILabel alloc] init]; 158 | _noDataLabel.font = [UIFont systemFontOfSize:25.0f weight:UIFontWeightMedium]; 159 | _noDataLabel.backgroundColor = UIColor.clearColor; 160 | _noDataLabel.textColor = UIColor.whiteColor; 161 | _noDataLabel.textAlignment = NSTextAlignmentCenter; 162 | _noDataLabel.text = @"No Data..."; 163 | } 164 | 165 | return _noDataLabel; 166 | } 167 | 168 | - (ACollectionView *) collectionView { 169 | if (!_collectionView) { 170 | _collectionView = [[ACollectionView alloc] init]; 171 | _collectionView.dataSource = self.collectionViewDataHandle; 172 | _collectionView.delegate = self.collectionViewDataHandle; 173 | _collectionView.alpha = 0.0f; 174 | } 175 | 176 | return _collectionView; 177 | } 178 | 179 | - (ACollectionViewDataHandle *) collectionViewDataHandle { 180 | if (!_collectionViewDataHandle) { 181 | _collectionViewDataHandle = [[ACollectionViewDataHandle alloc] init]; 182 | _collectionViewDataHandle.handleTouch = self; 183 | } 184 | 185 | return _collectionViewDataHandle; 186 | } 187 | 188 | #pragma mark - UISearchBarDelegate 189 | 190 | - (void) searchBar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText { 191 | [self _updateDataAndLoaderWithString:searchText]; 192 | } 193 | 194 | - (void) searchBarCancelButtonClicked:(UISearchBar *)searchBar { 195 | searchBar.text = nil; 196 | [searchBar resignFirstResponder]; 197 | 198 | [self _updateDataAndLoaderWithString:nil]; 199 | } 200 | 201 | - (void) searchBarSearchButtonClicked:(UISearchBar *)searchBar { 202 | [searchBar resignFirstResponder]; 203 | } 204 | 205 | #pragma mark - ACollectionViewDelegatesTouchHandle 206 | 207 | - (void) collectioinViewHandle:(ACollectionViewDataHandle *)handle didTouchInstruction:(AInstruction *)instruction { 208 | AInstructionViewController *instructionViewController = [[AInstructionViewController alloc] init]; 209 | instructionViewController.instruction = instruction; 210 | 211 | [self.navigationController pushViewController:instructionViewController animated:YES]; 212 | } 213 | 214 | @end 215 | 216 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Main/ANavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ANavigationController.h 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import 25 | 26 | NS_ASSUME_NONNULL_BEGIN 27 | 28 | @class AInstructionLoader; 29 | @interface ANavigationController : UINavigationController 30 | 31 | - (instancetype) initWithLoader:(AInstructionLoader *)loader; 32 | 33 | @end 34 | 35 | NS_ASSUME_NONNULL_END 36 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/Main/ANavigationController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ANavigationController.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | #import "ANavigationController.h" 25 | #import "AMainViewController.h" 26 | 27 | @interface ANavigationController () 28 | @property (nonatomic, weak) AInstructionLoader *loader; 29 | @property (nonatomic, strong) AMainViewController *mainViewController; 30 | 31 | @end 32 | 33 | @implementation ANavigationController 34 | 35 | #pragma mark - ANavigationController 36 | 37 | - (instancetype) initWithLoader:(AInstructionLoader *)loader { 38 | if (self = [super init]) { 39 | self.loader = loader; 40 | self.navigationBar.tintColor = [UIColor colorFromHex:0x8fa2b1]; 41 | 42 | UINavigationBarAppearance *navigationBarAppearence = [[UINavigationBarAppearance alloc] init]; 43 | navigationBarAppearence.shadowColor = UIColor.clearColor; 44 | navigationBarAppearence.backgroundColor = [UIColor colorFromHex:0x424C54]; 45 | navigationBarAppearence.titleTextAttributes = @{NSForegroundColorAttributeName: UIColor.whiteColor, NSFontAttributeName: [UIFont systemFontOfSize:25.0f weight:UIFontWeightMedium]}; 46 | self.navigationBar.standardAppearance = navigationBarAppearence; 47 | 48 | self.viewControllers = @[self.mainViewController]; 49 | } 50 | 51 | return self; 52 | } 53 | 54 | #pragma mark - Setter 55 | 56 | - (AMainViewController *) mainViewController { 57 | if (!_mainViewController) { 58 | _mainViewController = [[AMainViewController alloc] initWithLoader:self.loader]; 59 | } 60 | 61 | return _mainViewController; 62 | } 63 | 64 | @end 65 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/PrefixHeader.pch: -------------------------------------------------------------------------------- 1 | // 2 | // PrefixHeader.pch 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #ifndef PrefixHeader_pch 26 | #define PrefixHeader_pch 27 | 28 | // Helpers 29 | #import "Defines.h" 30 | #import "UIColor+A.h" 31 | #import "NSString+A.h" 32 | #import "AInstructionLoader.h" 33 | 34 | #endif /* PrefixHeader_pch */ 35 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/WebView/AWebViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // AWebViewController.h 3 | // ARM64 4 | // 5 | // Created by evilpenguin on 6/28/20. 6 | // Copyright © 2020 EvilPenguin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | NS_ASSUME_NONNULL_BEGIN 12 | 13 | @interface AWebViewController : UIViewController 14 | 15 | - (void) loadHTMLString:(NSString *)string; 16 | 17 | @end 18 | 19 | NS_ASSUME_NONNULL_END 20 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/WebView/AWebViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // AWebViewController.m 3 | // ARM64 4 | // 5 | // Created by evilpenguin on 6/28/20. 6 | // Copyright © 2020 EvilPenguin. All rights reserved. 7 | // 8 | 9 | #import "AWebViewController.h" 10 | 11 | @interface AWebViewController () 12 | @property (nonatomic, strong) WKWebView *webView; 13 | 14 | @end 15 | 16 | @implementation AWebViewController 17 | 18 | #pragma mark - AWebViewController 19 | 20 | - (instancetype) init { 21 | if (self = [super init]) { 22 | self.modalPresentationStyle = UIModalPresentationPageSheet; 23 | } 24 | 25 | return self; 26 | } 27 | 28 | - (void) viewDidLoad { 29 | [super viewDidLoad]; 30 | 31 | self.view.backgroundColor = UIColor.whiteColor; 32 | [self.view addSubview:self.webView]; 33 | } 34 | 35 | - (void) viewWillLayoutSubviews { 36 | [super viewWillLayoutSubviews]; 37 | 38 | self.webView.frame = self.view.bounds; 39 | } 40 | 41 | #pragma mark - Public 42 | 43 | - (void) loadHTMLString:(NSString *)string { 44 | self.webView.alpha = 0.0f; 45 | [self.webView loadHTMLString:string baseURL:NSBundle.mainBundle.bundleURL]; 46 | } 47 | 48 | #pragma mark - Lazy 49 | 50 | - (WKWebView *) webView { 51 | if (!_webView) { 52 | _webView = [[WKWebView alloc] initWithFrame:CGRectZero configuration:WKWebViewConfiguration.new]; 53 | _webView.contentMode = UIViewContentModeScaleAspectFit; 54 | _webView.navigationDelegate = self; 55 | } 56 | 57 | return _webView; 58 | } 59 | 60 | #pragma mark - WKNavigationDelegate 61 | 62 | - (void) webView:(WKWebView *)webView didFinishNavigation:(null_unspecified WKNavigation *)navigation { 63 | [UIView animateWithDuration:0.35f animations:^{ 64 | self.webView.alpha = 1.0f; 65 | }]; 66 | } 67 | 68 | @end 69 | -------------------------------------------------------------------------------- /ARMRef/ARMRef/Source/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // 4 | // Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 5 | // 6 | // Permission is hereby granted, free of charge, to any person obtaining a copy 7 | // of this software and associated documentation files (the "Software"), to deal 8 | // in the Software without restriction, including without limitation the rights 9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | // copies of the Software, and to permit persons to whom the Software is 11 | // furnished to do so, subject to the following conditions: 12 | // 13 | // The above copyright notice and this permission notice shall be included in 14 | // all copies or substantial portions of the Software. 15 | // 16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | // THE SOFTWARE. 23 | 24 | 25 | #import 26 | #import "AAppDelegate.h" 27 | 28 | int main(int argc, char * argv[]) { 29 | NSString *appDelegateClassName; 30 | 31 | @autoreleasepool { 32 | appDelegateClassName = NSStringFromClass(AAppDelegate.class); 33 | } 34 | 35 | return UIApplicationMain(argc, argv, nil, appDelegateClassName); 36 | } 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 ARMRef (https://github.com/evilpenguin/ARMRef) 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [1.1]: http://i.imgur.com/tXSoThF.png (twitter icon with padding) 2 | [1]: http://www.twitter.com/jamiebishop123 3 | [2]: http://www.twitter.com/evilpenguin_ 4 | 5 | # ARMRef 6 | 7 | An iOS, iPadOS, and macOS application reference manual for ARM assembly instructions 8 | 9 | Contribution 10 | -------- 11 | - Please contribute to this! 12 | - Put in PRs for any features you'd like to see. 13 | - Let's make this a community driven tool. 14 | 15 | Testing 16 | -------- 17 | - Application is on Apple's TestFlight 18 | - If you want TestFlight access just ping me on Twitter [![alt text][1.1]][2] 19 | - Application will be released in the AppStore 20 | 21 | Required 22 | ---------- 23 | - iOS 13+ 24 | - iPadOS 13+ 25 | - macOS 10.15+ 26 | 27 | ARM Versions 28 | ---------- 29 | - v8.6a 30 | - v8.6a (32-bit) 31 | - Grab more from (https://developer.arm.com/architectures/cpu-architecture/a-profile/exploration-tools) 32 | 33 | How to 34 | ---------- 35 | - Open ARMRef/ARMRef.xcodeproj 36 | - Build and run :) 37 | 38 | Shout-out 39 | ---------- 40 | - @jamiebishop123‬ [![alt text][1.1]][1] 41 | 42 | Suggested 43 | ---------- 44 | - Enjoy :) 45 | - Contribute! 46 | - Follow me [![alt text][1.1]][2] 47 | 48 | Coming 49 | ---------- 50 | - Android 51 | 52 | Screenshot 53 | ---------- 54 | ![All](all.png) 55 | -------------------------------------------------------------------------------- /all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/all.png -------------------------------------------------------------------------------- /icon.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icon.sketch -------------------------------------------------------------------------------- /icons/Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/Icon.png -------------------------------------------------------------------------------- /icons/Icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/Icon@2x.png -------------------------------------------------------------------------------- /icons/icon_20pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_20pt.png -------------------------------------------------------------------------------- /icons/icon_20pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_20pt@2x.png -------------------------------------------------------------------------------- /icons/icon_20pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_20pt@3x.png -------------------------------------------------------------------------------- /icons/icon_29pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_29pt.png -------------------------------------------------------------------------------- /icons/icon_29pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_29pt@2x.png -------------------------------------------------------------------------------- /icons/icon_29pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_29pt@3x.png -------------------------------------------------------------------------------- /icons/icon_40pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_40pt.png -------------------------------------------------------------------------------- /icons/icon_40pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_40pt@2x.png -------------------------------------------------------------------------------- /icons/icon_40pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_40pt@3x.png -------------------------------------------------------------------------------- /icons/icon_60pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_60pt@2x.png -------------------------------------------------------------------------------- /icons/icon_60pt@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_60pt@3x.png -------------------------------------------------------------------------------- /icons/icon_76pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_76pt.png -------------------------------------------------------------------------------- /icons/icon_76pt@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_76pt@2x.png -------------------------------------------------------------------------------- /icons/icon_83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/icons/icon_83.5@2x.png -------------------------------------------------------------------------------- /splash.sketch: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/splash.sketch -------------------------------------------------------------------------------- /splash/copyright@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/splash/copyright@2x.png -------------------------------------------------------------------------------- /splash/copyright@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/splash/copyright@3x.png -------------------------------------------------------------------------------- /splash/cpu@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/splash/cpu@2x.png -------------------------------------------------------------------------------- /splash/cpu@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evilpenguin/ARMRef/a81f58cb5ee674bb250964948b633b72ad3c65e4/splash/cpu@3x.png --------------------------------------------------------------------------------