Posts

Showing posts with the label apps

iOS Swift Loading subview animation

import UIKit class CircleLoading : UIView {          init () {         super . init ( frame : . zero )         self . setupViews ()     }          required init ?( coder : NSCoder ) {         super . init ( coder : coder)         self . setupViews ()     }          private func setupViews () {         self . backgroundColor = . clear                  var delay = 0.0         [- 50.0 , 0.0 , 50.0 ]. forEach { anchorX in             let viewCircle = createCircle ( anchorX : anchorX)             UIView . animate (                 withDuration : 0.5 ,                 delay : delay,   ...

iOS Swift Codable Different json fields manual parsing

Image
  Property   Children   tidak ada di api: Parent  ->  /api/user_parents seperti berikut: tetapi ada di api: Parent with children  ->  /api/user_parents?include=children seperti berikut: Agar Property  Children  tidak gagal parsing, menurut dokumentasi, maka semua property Codable harus diisi secara manual, di fungsi berikut: public required convenience init(from decoder: Decoder) Agar generate parse dapat dilakukan dengan mudah, maka lakukan langkah berikut, 1. generate model seperti biasa di  https://app.quicktype.io/  hasilnya seperti berikut 2. Buatlah Convenience Init seperti berikut 3. Generate json yang tadi di website: https: //json2kt .com/json-to-swift .php Sehingga properties di atas akan di generate kan `decodeIfPresent` nya 4. Copy body dari `init(from)` dan paste di model kita, sehingga akhirnya menjadi seprti berikut:

iOS Swift scrolled tableview image background

import UIKit import TPKeyboardAvoiding class CustomTableView : TPKeyboardAvoidingTableView {          lazy var imageViewBgHeader : UIImageView = {         let imageViewBgHeader = UIImageView ()         imageViewBgHeader. image = kImg . bgHeaderHome . image         imageViewBgHeader. contentMode = . scaleAspectFill         imageViewBgHeader. isUserInteractionEnabled = false         imageViewBgHeader. clipsToBounds = true         return imageViewBgHeader     }()          var constraintImageWidth : NSLayoutConstraint ?          override init ( frame : CGRect , style : UITableView . Style ) {         super . init ( frame : frame, style : style)                  setupView ()     }      ...

Pindai nomor telepon dengan aplikasi PNScanner

Image
PNScanner   Nomor telepon adalah hal yang krusial di zaman sekarang. Setiap orang pasti memiliki nomor telepon, apalagi untuk seorang pembisnis atau seorang account executive, nomor telepon adalah hal yang wajib untuk mereka milik. Di zaman sekarang yang serba otomastis, menulis kontak nomor telepon terkadang cukup merepotkan, belum lagi apabila terjadi kesalahan saat proses penginputan,  PNScanner  menjadi solusi untuk pengguna smartphone android untuk bisa memindai nomor telepon dari kamera atau dari galley. Hal ini memudahkan dan mempersingkat waktu dalam menginput nomor telepon. tag: phone-number, scanner, pnscanner, camera scan, pindai, nomor telepon

Scan phone number with PNScanner apps

Image
PNScanner   Telephone numbers are crucial today. Everyone must have a telephone number, especially for a businessman or an account executive, a telephone number is mandatory for them to belong. In today's automated, writing contact phone numbers is sometimes quite troublesome, not to mention if an error occurs during the input process, PNScanner is a solution for android smartphone users to be able to scan phone numbers from cameras or from galleys. This facilitates and shortens the time in entering telephone numbers. tag: phone-number, scanner, pnscanner, camera scan