Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ class iBoxFactory: ProjectFactory {

let dependencies: [TargetDependency] = [
.external(name: "SnapKit"),
.external(name: "SwiftSoup"),
.target(name: "iBoxShareExtension")
]

let iBoxShareExtensionDependencies: [TargetDependency] = [
.external(name: "SnapKit"),
.external(name: "SwiftSoup")
.external(name: "SnapKit")
]

private let appInfoPlist: [String: Plist.Value] = [
Expand Down Expand Up @@ -92,8 +92,8 @@ class iBoxFactory: ProjectFactory {
bundleId: "\(bundleId).ShareExtension",
deploymentTarget: .iOS(targetVersion: iosVersion, devices: [.iphone]),
infoPlist: .extendingDefault(with: shareExtensionInfoPlist),
sources: ["ShareExtension/**"],
resources: [],
sources: ["ShareExtension/Sources/**"],
resources: ["ShareExtension/Resources/**"],
dependencies: iBoxShareExtensionDependencies
)

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions ShareExtension/Resources/Media.xcassets/128.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"images" : [
{
"filename" : "128.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "128 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions ShareExtension/Resources/Media.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
182 changes: 0 additions & 182 deletions ShareExtension/ShareViewController.swift

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// ShareExtension+UIColor+Extension.swift
// iBoxShareExtension
//
// Created by Chan on 4/14/24.
//

import UIKit

extension UIColor {

convenience init(hex: UInt, alpha: CGFloat = 1.0) {
self.init(
red: CGFloat((hex & 0xFF0000) >> 16) / 255.0,
green: CGFloat((hex & 0x00FF00) >> 8) / 255.0,
blue: CGFloat(hex & 0x0000FF) / 255.0,
alpha: CGFloat(alpha)
)
}

static let box2 = UIColor(hex: 0xFF9548)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//
// ShareExtension+UIbutton+Extension.swift
// iBoxShareExtension
//
// Created by Chan on 4/14/24.
//

import UIKit

extension UIButton {
func setBackgroundColor(_ color: UIColor, for state: UIControl.State) {
UIGraphicsBeginImageContext(CGSize(width: 1.0, height: 1.0))
guard let context = UIGraphicsGetCurrentContext() else { return }
context.setFillColor(color.cgColor)
context.fill(CGRect(x: 0.0, y: 0.0, width: 1.0, height: 1.0))

let backgroundImage = UIGraphicsGetImageFromCurrentImageContext()
UIGraphicsEndImageContext()

setBackgroundImage(backgroundImage, for: state)
}
}
Loading