Swiftpack.co - Package - sam38124/JzOsFrameWork

Platform characteristic

JzOsFrameWork

This is a framework base on android architecture so you can very easily bulid android and ios native app no need Logic conversion~

android版本

List

How to introduce to the project?

Support Swift Package。

1.Open xcode and paste link for Swift Package

  • https://github.com/sam38124/JzOsFrameWork

Quick Start

1.Create ViewController and extend JzActivity

import UIKit
import JzIos_Framework

class ViewController:JzActivity{

    @IBOutlet var container: UIView!

    override func viewInit() {

        //Set the place where you want to change page and defined to rootview
        rootView=container
        //Set the home page
        JzActivity.getControlInstance.setHome(Page_Home(), "Home")
    }
    override func changePageListener(_ controler: pagemenory) {

        print("Switch\(controler.tag)")

    }
 
}

And use all function like android logic

public protocol ControlInstance {
    //Get memory like android SharedPreferences
    func getPro(_ name: String,_ normal:String)->String
    //Get memory like android SharedPreferences
    func getPro(_ name: String,_ normal:Bool)->Bool
    //Get memory like android SharedPreferences
    func getPro(_ name: String,_ normal:Int)->Int
    //Store memory like android SharedPreferences
    func setPro(_ name:String,_ key:String)
    //Store memory like android SharedPreferences
    func setPro(_ name:String,_ key:Bool)
    //Store memory like android SharedPreferences
    func setPro(_ name:String,_ key:Int)
    //Clear memory like android SharedPreferences
    func removePro()
    //Set the home page
    func setHome(_ home:UIViewController,_ tag:String)
    //Go back
    func goBack()
    //Go back to viewController where tag is input value
    func goBack(_ tag:String)
    //ChangePage
    func changePage(_ newViewController: UIViewController,_ tag:String,_ goback:Bool)
    //Change viewController where view area you want to display
    func changeFrage(_ original: UIView,_ newViewController: UIViewController,_ originViewController:UIViewController)
    //Get viewController where tag is input value
    func getPageByTag(_ tag:String) -> UIViewController?
    //Open Dialog
    func openDiaLog(_ newViewController: UIViewController,_ swipe:Bool,_ tag:String)
    //Close all dialog 
    func closeDialLog()
    //Close dialog where tag is input value
    func closeDialLog(_ tag:String)
    //Reback to home page
    func goMenu()
    //Get root controller where extend JzActivity
    func getActivity()->JzActivity
    //Get rootview width
    func getViewWidth() -> Int
    //Get rootview height
    func getViewHeight() -> Int
    //Get something information about device
    func getDeviceInformation() -> deviceInfo
    //Show toast like android
    func toast(_ text:String)
    //Close app
    func closeApp()
    //Get now page tag name 
    func getNowPageTag() -> String
    //Get now page on screen
    func getNowPage() -> UIViewController
    //Set drawer viewController
    func setDrawer(_ newViewController: UIViewController)
    //Open drawer if open
    func openDrawer()
    //Close drawer if open
    func closeDrawer()
    //Get drawer
    func getDrawer()->UIViewController
    //Open drag gesture for drawer
    func canDragDrawer()
    //Close drag gesture for drawer
    func lockDrawer()
    //Get ipa version on appleStore
    func getStoreVersion(_ caller:GetVersion)
    //Remove screen controller 
    func removeController(_ controller:UIViewController)
    //Get controller in Storyboard
    func getNewController(_ name:String,_ id:String) -> UIViewController
    //Go appleStore
    func goAppStore(appid:String)   
}

About me

Work for:

  • 【Orange Electronic】

Position:

  • Full stack engineer

Main defense range:

  • Android and IOS(4 years)
  • Jsp(2 years)
  • Javascript and Jquery and Ktor(1 years)

Contact information:

  • line:sam38124
  • gmail:sam38124@gmail.com

Github

link
Stars: 1

Dependencies

Used By

Total: 0

Releases

- 2020-09-09 07:05:45