It's been so long I don't even know what I changed. Removed the contacts tab completely, before it was still in the app just not accessible. Switched over from RichTextView to iosMath saving about 4MB. Couple small design tweaks. Reduced total app size from 10MB to 4.5

This commit is contained in:
Isaac Greene 2023-06-06 10:42:22 -04:00
parent 0dc0267dbd
commit 099728c760
17 changed files with 222 additions and 395 deletions

32
Splits/LaTeXView.swift Normal file
View file

@ -0,0 +1,32 @@
//
// LaTeXView.swift
// Paces
//
// Created by Isaac Greene on 2023-01-16.
//
import SwiftUI
import UIKit
import iosMath
struct MathView: UIViewRepresentable {
var latex: String
@Environment(\.colorScheme) var colorScheme
func makeUIView(context: Context) -> MTMathUILabel {
let label = MTMathUILabel()
label.latex = latex
label.textColor = textColor(for: colorScheme)
return label
}
func updateUIView(_ uiView: MTMathUILabel, context: Context) {
uiView.latex = latex
uiView.textColor = textColor(for: colorScheme)
}
private func textColor(for colorScheme: ColorScheme) -> UIColor {
return colorScheme == .dark ? .white : .black
}
}