-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/moribaleta/ReNode
# Conflicts: # Example/Pods/Pods.xcodeproj/project.pbxproj # Example/Pods/Pods.xcodeproj/xcuserdata/mini.xcuserdatad/xcschemes/xcschememanagement.plist # Example/ReNode.xcodeproj/project.pbxproj # Example/ReNode.xcodeproj/xcuserdata/mini.xcuserdatad/xcschemes/xcschememanagement.plist # Example/ReNode.xcworkspace/xcuserdata/mini.xcuserdatad/UserInterfaceState.xcuserstate # Example/ReNode.xcworkspace/xcuserdata/mini.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist # Example/ReNodeSample/SampleController.swift # Example/ReNodeSample/SampleView.swift # Example/ReNodeSample/sampleviews/SampleButtons.swift # Example/ReNodeSample/sampleviews/SampleTexts.swift # ReNode/Classes/style/Common.swift # ReNode/Classes/views/base/ReButton.swift # ReNode/Classes/views/components/ReCellNode.swift
- Loading branch information
Showing
17 changed files
with
245 additions
and
0 deletions.
There are no files selected for viewing
Binary file modified
BIN
+438 Bytes
(100%)
...eNode.xcworkspace/xcuserdata/gabrielmoribaleta.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
// | ||
// FontLoader.swift | ||
// ReNode | ||
// | ||
// Created by Mini on 1/6/22. | ||
// | ||
|
||
import UIKit | ||
import Foundation | ||
import CoreText | ||
|
||
|
||
public enum Fonts: String { | ||
case Roboto = "Roboto" | ||
case SeriousMD = "SeriousMD" // icon | ||
} | ||
|
||
class FontLoader: NSObject { | ||
class func loadFont(_ fontName: String) { | ||
let bundle = Bundle(for: FontLoader.self) | ||
let paths = bundle.paths(forResourcesOfType: "ttf", inDirectory: nil) | ||
var fontURL: NSURL? | ||
var error: Unmanaged<CFError>? | ||
|
||
paths.forEach { | ||
guard let filename = NSURL(fileURLWithPath: $0).lastPathComponent, | ||
filename.lowercased().range(of: fontName.lowercased()) != nil else { | ||
return | ||
} | ||
|
||
fontURL = NSURL(fileURLWithPath: $0) | ||
} | ||
|
||
guard let fontURL = fontURL else { | ||
return | ||
} | ||
|
||
guard | ||
!CTFontManagerRegisterFontsForURL(fontURL, .process, &error), | ||
let unwrappedError = error, | ||
let nsError = (unwrappedError.takeUnretainedValue() as AnyObject) as? NSError else { | ||
|
||
return | ||
} | ||
|
||
let errorDescription: CFString = CFErrorCopyDescription(unwrappedError.takeUnretainedValue()) | ||
|
||
NSException(name: NSExceptionName.internalInconsistencyException, | ||
reason: errorDescription as String, | ||
userInfo: [NSUnderlyingErrorKey: nsError]).raise() | ||
} | ||
} | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
// | ||
// Icon.swift | ||
// ReNode | ||
// | ||
// Created by Mini on 1/6/22. | ||
// | ||
|
||
import Foundation | ||
|
||
public enum Icon: String { | ||
case actionAdd = "\u{E906}" | ||
case actionAddAppoinment = "\u{E900}" | ||
case actionAddClinic = "\u{E901}" | ||
case actionAddNote = "\u{E902}" | ||
case actionAddProfile = "\u{E903}" | ||
case actionAddRecord = "\u{E904}" | ||
case actionAddVitals = "\u{E905}" | ||
case actionArchive = "\u{E907}" | ||
case actionCamera = "\u{E908}" | ||
case actionClose = "\u{E909}" | ||
case actionAttach = "\u{E90A}" | ||
case actionCrop = "\u{E90B}" | ||
case actionDelete = "\u{E90C}" | ||
case actionDownload = "\u{E90D}" | ||
case actionEdit = "\u{E90E}" | ||
case actionErase = "\u{E90F}" | ||
case actionFilter = "\u{E910}" | ||
case actionHand = "\u{E911}" | ||
case actionHide = "\u{E912}" | ||
case actionInvite = "\u{E913}" | ||
case actionLink = "\u{E914}" | ||
case actionLocation = "\u{E915}" | ||
case actionLogout = "\u{E916}" | ||
case actionMenu = "\u{E917}" | ||
case actionMinus = "\u{E918}" | ||
case actionMoreHorizontal = "\u{E919}" | ||
case actionMoreVertical = "\u{E91A}" | ||
case actionOverview = "\u{E91B}" | ||
case actionPrint = "\u{E91C}" | ||
case actionReferPatient = "\u{E91D}" | ||
case actionRegister = "\u{E91E}" | ||
case actionRemove = "\u{E91F}" | ||
case actionReport = "\u{E920}" | ||
case actionRotateLeft = "\u{E921}" | ||
case actionRotateRight = "\u{E922}" | ||
case actionSave = "\u{E923}" | ||
case actionSearch = "\u{E924}" | ||
case actionSend = "\u{E925}" | ||
case actionShare = "\u{E926}" | ||
case actionShow = "\u{E927}" | ||
case actionTemplate = "\u{E929}" | ||
case actionTemplateSave = "\u{E928}" | ||
case actionText = "\u{E92A}" | ||
case actionTutorial = "\u{E92B}" | ||
case actionVoid = "\u{E92C}" | ||
case actionZoomIn = "\u{E92D}" | ||
case actionZoomOut = "\u{E92E}" | ||
case arrowDown = "\u{E92F}" | ||
case arrowLeft = "\u{E930}" | ||
case arrowRight = "\u{E931}" | ||
case arrowUp = "\u{E932}" | ||
case doctorProfileEducation = "\u{E933}" | ||
case doctorProfileSocial = "\u{E934}" | ||
case doctorProfileSpecialty = "\u{E935}" | ||
case healthRecordAudio = "\u{E936}" | ||
case healthRecordBiopsy = "\u{E937}" | ||
case healthRecordBloodTest = "\u{E938}" | ||
case healthRecordHeartStation = "\u{E939}" | ||
case healthRecordImaging = "\u{E93A}" | ||
case healthRecordNeuromuscularTest = "\u{E93B}" | ||
case healthRecordNuclearMedicine = "\u{E93C}" | ||
case healthRecordOphthalmology = "\u{E93D}" | ||
case healthRecordOrganVisualization = "\u{E93E}" | ||
case healthRecordOtherBodyFluid = "\u{E93F}" | ||
case healthRecordPulmonaryFunction = "\u{E940}" | ||
case healthRecordStoolExam = "\u{E941}" | ||
case healthRecordTherapeuticRadiology = "\u{E942}" | ||
case healthRecordUrineExam = "\u{E943}" | ||
case healthRecordVascularStudy = "\u{E944}" | ||
case healthRecordWomensHealth = "\u{E945}" | ||
case menuAppointments = "\u{E946}" | ||
case menuBilling = "\u{E947}" | ||
case menuClinic = "\u{E948}" | ||
case menuContacts = "\u{E949}" | ||
case menuDashboard = "\u{E94A}" | ||
case menuInbox = "\u{E94B}" | ||
case menuMessenger = "\u{E94C}" | ||
case menuProfile = "\u{E94D}" | ||
case menuQueue = "\u{E94E}" | ||
case menuSettings = "\u{E94F}" | ||
case menuSupport = "\u{E950}" | ||
case patientProfileHealthRecord = "\u{E951}" | ||
case patientProfileNote = "\u{E952}" | ||
case patientProfileQueueOptions = "\u{E953}" | ||
case patientProfileVital = "\u{E954}" | ||
case profileAllergies = "\u{E955}" | ||
case profileFamilyHistory = "\u{E956}" | ||
case profileGrowthMilestone = "\u{E957}" | ||
case profileImmunization = "\u{E958}" | ||
case profileMedHistory = "\u{E959}" | ||
case profileMedication = "\u{E95A}" | ||
case profileMenstrualHistory = "\u{E95B}" | ||
case profileObstetricHistory = "\u{E95C}" | ||
case profileProcedure = "\u{E95D}" | ||
case profileSexualHistory = "\u{E95E}" | ||
case profileSubstanceUse = "\u{E95F}" | ||
case queueCancelled = "\u{E960}" | ||
case queueComplete = "\u{E961}" | ||
case queuePending = "\u{E962}" | ||
case queueProcedure = "\u{E963}" | ||
case queueSkipped = "\u{E964}" | ||
case templateCanvas = "\u{E965}" | ||
case templateImage = "\u{E966}" | ||
case templateLabTests = "\u{E967}" | ||
case templateMedCertificate = "\u{E968}" | ||
case templateMedClearance = "\u{E969}" | ||
case templatePhysicalExam = "\u{E96A}" | ||
case templatePrescription = "\u{E96B}" | ||
case templateSoap = "\u{E96C}" | ||
case templateText = "\u{E96D}" | ||
case toggleCollapse = "\u{E96E}" | ||
case toggleExpand = "\u{E96F}" | ||
case toggleSectionCollapse = "\u{E970}" | ||
case toggleSectionExpand = "\u{E971}" | ||
case utilAttention = "\u{E972}" | ||
case utilBodyDiagram = "\u{E973}" | ||
case utilCheck = "\u{E974}" | ||
case utilDate = "\u{E975}" | ||
case utilFavorites = "\u{E977}" | ||
case utilFavoritesFilled = "\u{E976}" | ||
case utilInfo = "\u{E978}" | ||
case utilNotification = "\u{E979}" | ||
case utilRearrange = "\u{E97A}" | ||
case utilRx = "\u{E97B}" | ||
case utilStarburst = "\u{E97C}" | ||
case utilTime = "\u{E97D}" | ||
case viewGallery = "\u{E97E}" | ||
case viewList = "\u{E97F}" | ||
case vitalBmi = "\u{E980}" | ||
case vitalBp = "\u{E981}" | ||
case vitalCbg = "\u{E982}" | ||
case vitalHeadCircumference = "\u{E983}" | ||
case vitalHeartRate = "\u{E984}" | ||
case vitalHeight = "\u{E985}" | ||
case vitalOxygenSaturation = "\u{E986}" | ||
case vitalRespiratoryRate = "\u{E987}" | ||
case vitalTemperature = "\u{E988}" | ||
case vitalWeight = "\u{E989}" | ||
|
||
|
||
case utilMobilePhone = "\u{e990}" | ||
case actionCall = "\u{e991}" | ||
case utilChecklist = "\u{e992}" | ||
case utilTouch = "\u{e993}" | ||
case google = "\u{e994}" | ||
case yahoo = "\u{e995}" | ||
case facebook = "\u{e996}" | ||
|
||
case notes = "\u{e997}" | ||
case summary = "\u{e998}" | ||
case labs = "\u{e999}" | ||
|
||
case splitScreen = "फ" | ||
|
||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// UIFont.swift | ||
// ReNode | ||
// | ||
// Created by Mini on 1/6/22. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
public extension UIFont { | ||
static func icon(from font: Fonts, ofSize size: CGFloat) -> UIFont { | ||
let fontName = font.rawValue | ||
let fontNames = UIFont.fontNames(forFamilyName: font.rawValue) | ||
if !fontNames.contains(fontName) | ||
{ | ||
FontLoader.loadFont(fontName) | ||
} | ||
return UIFont(name: fontName, size: size)! | ||
} | ||
|
||
static func font(_ font: Fonts, ofSize size: CGFloat) -> UIFont { | ||
return UIFont(name: font.rawValue, size: size)! | ||
} | ||
} |