一,工程图. 二,代码. - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. NSString* cityPlistPath = [[NSBundle mainBundle] pathForResource:@"cities" ofType:@"plist"]; //按照拼写排序,spel…
一,效果图. 二,工程图. 三,代码. ChooseCityViewController.h #import <UIKit/UIKit.h> @interface ChooseCityViewController : UIViewController <UITableViewDelegate,UITableViewDataSource> { NSMutableArray * dataArray; UITableView * mTableView; } @end ChooseCity…
一,效果图. 二,工程图. 三,代码. RootViewController.h #import <UIKit/UIKit.h> @interface RootViewController : UIViewController <UITableViewDelegate,UITableViewDataSource> { UITableView * _tableView; NSMutableArray * provinceArray; } @end RootViewController…
IOS开发笔记  IOS如何访问通讯录 其实我是反对这类的需求,你说你读我的隐私,我肯定不愿意的. 幸好ios6.0 以后给了个权限控制.当打开app的时候你可以选择拒绝. 实现方法: [plain] view plaincopy //读取所有联系人 -(void)ReadAllPeoples { //取得本地通信录名柄 ABAddressBookRef tmpAddressBook = nil; if ([[UIDevice currentDevice].systemVersion float…
一.概述 在本篇博文中,试图通过代码了解hadoop job执行的整个流程.即用户提交的mapreduce的jar文件.输入提交到hadoop的集群,并在集群中运行.重点在代码的角度描述整个流程,有些细节描述的并不那么详细. 汇总的代码流程图附件: hadoop_mapreduce_jobsubmit 二.主要流程 Jobclient通过RPC方式调用到jobtracker的submitJob方法提交作业,包括作业的jar.分片和作业描述. JobTracker的submitJob方法吧job加…
activity_main.xml <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent"…
不说废话,上效果图 因为我有多处要用到,所以我这里是写成自定义组件的,你也可以直接改成在page页面编写: 布局左边一个scroll-view,显示城市列表,右边一个view显示字母列表,城市列表这边有首字母显示,给这个添加这个字母的ID,然后给右边的26个字母添加点击事件,点击的时候获取到点击的是哪个字母,给scroll-view的scroll-into-view赋值相应的字母,它左边就可以跳到相应的地方,再给scroll-view 加一个scroll-with-animation,让它跳转的…
项目地址: https://github.com/caochangkui/vue-cli3 项目代码: 城市列表首页: City.vue <template> <div id="city"> <!-- <img src="/logo.png" alt="" height="10px"> --> <div class="word" v-show="…
DW网页代码笔记 1.样式.       class  插入类样式  标签技术(html)解决页面的内容样式技术(css)解决页面的外观脚本技术       解决页面动态交互问题<form><input type="text" placeholder="请输入文字" class="kuang2"/><input type="submit" value="搜索" class=&q…
全国城市列表选择 (包含定位城市.热门城市.全国城市) 用ScrollView 实现,解决 SectionList 实现的卡顿问题 实现效果如图: 代码实现如图: 主逻辑文件 cityList.js 'use strict'; import React, {Component} from "react" import {Dimensions, ScrollView, StyleSheet, Text, TouchableOpacity, View} from 'react-native…