This file contains hidden or 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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
ScrollView { | |
VStack{ | |
CardViewItem() | |
} | |
.padding() |
This file contains hidden or 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
let url = (films[indexPath.row].artworkUrl100)! | |
let modifiedUrl = url.replacingOccurrences(of: "100x100", with: "800x800") |
This file contains hidden or 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
var url = (films[indexPath.row].artworkUrl100)! | |
url.removingRegexMatches(pattern: "100x100", replaceWith: "800x800") |
This file contains hidden or 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
import Foundation | |
extension String { | |
mutating func removingRegexMatches(pattern: String, replaceWith: String = "") { | |
do { | |
let regex = try NSRegularExpression(pattern: pattern, options: .caseInsensitive) | |
let range = NSRange(location: 0, length: count) | |
self = regex.stringByReplacingMatches(in: self, options: [], range: range, withTemplate: replaceWith) | |
} catch { return } | |
} |
This file contains hidden or 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
import Foundation | |
import UIKit | |
let button = UIButton(type: .custom) | |
extension UITextField { | |
func enablePasswordToggle(){ | |
button.setImage(UIImage(named: "icons8-open-eye-48"), for: .normal) |
This file contains hidden or 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
import UIKit | |
class TableViewController: UITableViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
} | |
// MARK: - Table view data source |
This file contains hidden or 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
import UIKit | |
protocol TextViewCellDelegate { | |
func updateCellHeight() | |
} | |
class TextViewCell: UITableViewCell { | |
var delegate: TextViewCellDelegate? |
This file contains hidden or 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
// | |
// TickCrossToggle.swift | |
// UIButtons | |
// | |
// Created by James Tapping on 04/03/2021. | |
// | |
import Foundation | |
import UIKit |
This file contains hidden or 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
func setUpAnimatedFramesButton() { | |
var imagesListArray :[UIImage] = [] | |
for position in 0...27 | |
{ | |
let strImageName : String = "icons8-cancel-\(position)" | |
let image = UIImage(named:strImageName) | |
imagesListArray.append(image!) | |
} |