Weex 的 iOS 组件和模型 WeexiOSKit

码农软件 · 软件分类 · iOS/iPhone/iPad开发包 · 2019-05-16 07:12:14

软件介绍

WeexiOSKit

WeexiOSKit主要是扩展了一些iOS的Component和Module,这样在weex端就可以很好的使用了。

Component 包括segmented-control(UISegmentedControl),stepper(UIStepper),seek-bar(UISeekBar),search-bar(UISearchBar),date-picker(UIDatePicker)。

Module主要包括actionSheet(UIActionSheet),MBProgressHUD(MBProgressHUD,loading视图),geolocation(CLLocationManager坐标),vibration(震动)。

Component

 

Module

  

WeexiOSKit使用

Component

segmented-control:支持iOS & web

属性:items(segmented-control里的项目,以分号隔开),momentary(是否设置选中状态),tint-color(颜色)

event:onchange

<segmented-control style="width: 240;height: 120;margin-top:20" items="hello;world" momentary= "false" tint-color= "red" onchange="onSCChangeAction"></segmented-control>

stepper
属性: value(当前的值),step-value(默认为1),minimum-value(最小值),maximum-value="100(最大值),tint-color(颜色)

event:onchange

<stepper style="width: 240;height: 120;margin-top:20" value="20" step-value= "10" minimum-value="0" maximum-value="100" tint-color= "red" onchange="onChangeAction"></stepper>

seek-bar
属性: value(当前的值),minimum-value(最小值),maximum-value="100(最大值),minimum-track-tint-color,maximum-track-tint-color, thumb-tint-color, minimum-track-image-src,maximum-track-image-src,thumb-image-src

event:onchange

<seek-bar style=" width: 400;height: 70;margin-top:20;margin-left:20" minimum-value="0" maximum-value="100" value="50" onchange="seekBarChange" minimum-track-tint-color="blue" maximum-track-tint-color="blue" thumb-tint-color="red" > sdsd</seek-bar>

<seek-bar style=" width: 160;height: 140;margin-top:20;margin-left:220" minimum-value="0" maximum-value="100" value="50" onchange="imageSeekBarChange"  thumb-image-src="https://raw.githubusercontent.com/jainsourabh2/SayIt/master/iOS/SayIt/SayIt/rating1.png" maximum-track-image-src="http://pic002.cnblogs.com/images/2012/348285/2012042611243397.png" minimum-track-image-src="http://pic002.cnblogs.com/images/2012/348285/2012042611244465.png"> sdsd</seek-bar>

search-bar
属性: tint-color(颜色)

event:onclick

<search-bar style="width: 300;height: 120;margin-top:20"  tint-color= "red" onclick="onclicksearch"></search-bar>

date-picker
属性: tint-color(颜色)

event:onchange

<date-picker style="width: 640;height: 400;margin-top:20"  tint-color= "red" onchange="onclickdatepicker" ></date-picker>

Module

MBProgressHUD为loading模块 函数:showHUD(显示HUD,参数为title,detail,mode[枚举值indicator/text],cancelTitle,contentColor),hideHUD隐藏HUD()

toast: function() {
        var MBProgressHUD = require('@weex-module/MBProgressHUD');
        MBProgressHUD.showHUD({title:"loading",contentColor:"red",mode:"indicator"});
        setTimeout(function () {
          MBProgressHUD.hideHUD();
        }, 2000)
      },

actionSheet 函数:actionSheetShow(参数为cancelButtonTitle,destructiveButtonTitle,otherButtonTitles(数组),以及一个回调)

actionSheet: function() {
        var me= this;
        var actionSheet = require('@weex-module/actionSheet');
        actionSheet.actionSheetShow({
          'cancelButtonTitle': 'cancel',
          'destructiveButtonTitle': 'destructive',
          'otherButtonTitles': me.buttons
        }, function(result) {
        });
      },

geolocation 定位模块

函数getCurrentPosition(参数accuracy,distanceFilter)

geolocationAction: function() {
        var me= this;
        var geolocation = require('@weex-module/geolocation');
        geolocation.getCurrentPosition({
          'accuracy': '1000',
          'distanceFilter': '10'
        }, function(result) {
          me.geolocationValue = JSON.stringify(result);
        }, function(result) {
        });
      },

vibration 函数:vibrate(真机震动)

vibrate: function() {
        var vibration = require('@weex-module/vibration');
        vibration.vibrate()
      }

本文地址:https://codercto.com/soft/d/5841.html

计算统计

计算统计

Geof H.Givens、Jennifer A.Hoeting / 王兆军、刘民千、邹长亮、杨建峰 / 人民邮电出版社 / 2009-09-01 / 59.00元

随着计算机的快速发展, 数理统计中许多涉及大计算量的有效方法也得到了广泛应用与迅猛发展, 可以说, 计算统计已是统计中一个很重要的研究方向. 本书既包含一些经典的统计计算方法, 如求解非线性方程组的牛顿方法、传统的随机模拟方法等, 又全面地介绍了近些年来发展起来的某些新方法, 如模拟退火算法、基因算法、EM算法、MCMC方法、Bootstrap方法等, 并通过某些实例, 对这些方法的应用进行......一起来看看 《计算统计》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具