Skip to content

Instantly share code, notes, and snippets.

View jerrypm's full-sized avatar
🎯
Focusing

Jerry <N.P> jerrypm

🎯
Focusing
View GitHub Profile
import UIKit
import WebKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Configure the web view for JavaScript injection
configureWebView()
@jerrypm
jerrypm / CustomTableView.swift
Created December 13, 2021 00:29
This can help you set auto height table inside tableview
import Foundation
import UIKit
public class UITableViewCustom: UITableView {
public override var intrinsicContentSize: CGSize {
self.layoutIfNeeded()
return self.contentSize
}
public override var contentSize: CGSize {
/*
here is stackView as tableView in table cell
Created by jeri pm
*/
import UIKit
class StepThreeTableViewCell: UITableViewCell {
@IBOutlet weak var titleTable: UILabel!
@IBOutlet weak var subview: UIView!
//
// Extension+String.swift
// 100DayOfSwift
//
// Created by Jerry Purnama Maulid on 17/06/20.
// Copyright © 2020 Jeri Purnama. All rights reserved.
//
/*
import UIKit
class CurrencyViewController: UIViewController {
@IBOutlet weak var curent: UITextField!
@IBOutlet weak var resultValue: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .base
curent.addTarget(self, action: #selector(myTextFieldDidChange), for: .editingChanged)
@jerrypm
jerrypm / apiTest
Last active September 20, 2021 02:11
{
"data": [
{
"id": 1,
"type": "instrumental",
"title": "Guitar A",
"image_name": "xxxxx.jpg",
"isLock": false,
"desc": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.",
"song": [
@jerrypm
jerrypm / MakeTransparentHoleOnOverlayView.swift
Created January 3, 2019 09:53 — forked from aldo-jlaurenstin/MakeTransparentHoleOnOverlayView.swift
Make a Transparent Hole on an Overlay UIView
//
// MakeTransparentHoleOnOverlayView.swift
//
// Created by James Laurenstin on 2015-04-10.
// Copyright (c) 2015 Aldo Group Inc. All rights reserved.
//
import UIKit
class MakeTransparentHoleOnOverlayView: UIView {
import Foundation
import UIKit
class CountTextField: UITextField, UITextFieldDelegate {
lazy var countLabel: UILabel = {
let label = UILabel(frame: CGRect(x: 0, y: 0, width: 20, height: 40))
label.font = UIFont.systemFont(ofSize: 12)
label.textAlignment = .center
label.textColor = #colorLiteral(red: 0.1098039216, green: 0.5176470588, blue: 0.8588235294, alpha: 1)
label.text = "16"
//Visit my blog http://scripttes.blogspot.com/
//IOS Template https://codecanyon.net/item/simple-qr-code-barcode-scanner-generate-ios-12-and-13/25018066
import Foundation
import UIKit
extension UIView {
func setGradientBackground(colorOne: UIColor, colorTwo: UIColor) {
let gradientLayer = CAGradientLayer()
gradientLayer.frame = bounds
import Alamofire
import SwiftyJson
import AVFoundation
import UIKit
class TestViewController: UIViewController, GalleryDelegate {
@IBOutlet weak var imgView: UIImageView!
var url: URL?
let videoUrl = "https://api.example/video... "