iOS开发Swift-12-列表UI,TableViewController,动态响应Button勾选-待办事项App(1)

2023-10-27

1.创建新项目
在这里插入图片描述

为项目添加图标
在这里插入图片描述

2.将Table View Controller添加到界面中
在这里插入图片描述

将箭头移动到Table View上来,代表它是首页(根页面).选中ViewController,点击Delete,对它进行删除.将代码ViewController.swift也删除掉.
在这里插入图片描述

新建一个Cocoa Touch Class.
在这里插入图片描述在这里插入图片描述

将TableViewController的class设置成TodosViewController.
在这里插入图片描述

2.为cell取名为TodoCellID.
在这里插入图片描述

3.创建一个Button,将Button的Image改为circle.创建一个Lable,将Lable的Lines改为0,可以自动换行.将Button和Lable放到同一个StackView里,设置约束为垂直居中.
在这里插入图片描述

为Button设定宽高约束,为Stack View设定上下左右约束,设定Stack View的Allgnment为Center(所有字样居中),Distribution为Fill,Spacing(Button与Lable的间距)为12.
在这里插入图片描述

4.创建一个UITableViewCell类型的swift,用于动态响应Button勾选以及文本的变化.
在这里插入图片描述

选择TodoCellID的Class为TodoCell.
在这里插入图片描述

5.创建一个Swift文件Todo.把他放到Modle文件夹下.
在这里插入图片描述

设定默认待办事项,并编码,使其展示在app首页上.

TodosViewController:

import UIKit

class TodosViewController: UITableViewController {
    
    let todos = [
        Todo(name: "学习iOS课程的基础课", checked: false),
        Todo(name: "学习iOS课程的零基础赏月App开发", checked: false),
        Todo(name: "学习iOS课程的零基础木琴App开发", checked: false),
        Todo(name: "学习iOS课程的零基础和风天气App开发", checked: false),
        Todo(name: "学习iOS课程的零基础待办事项App开发", checked: false),
        Todo(name: "学习iOS课程的小红书App开发", checked: false)
    ]

    override func viewDidLoad() {
        super.viewDidLoad()

        // Uncomment the following line to preserve selection between presentations
        // self.clearsSelectionOnViewWillAppear = false

        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem
    }

    // MARK: - Table view data source
    //配置TableView的一些数据

    override func numberOfSections(in tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 1   //总共有1个分类
    }

    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return todos.count   //总共有10个待办事项
    }

    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {  //此函数会根据上面两个函数(总共分类数和总共待办事项数)返回的内容多次执行
        let cell = tableView.dequeueReusableCell(withIdentifier: kTodoCellID , for: indexPath) as! TodoCell

//        // Configure the cell...
//        //配置主标题的文本
//        var contentConfiguration = cell.defaultContentConfiguration()
//        contentConfiguration.text = "昵称"   //主标题
//        contentConfiguration.secondaryText = "个性签名"    //副标题
//        contentConfiguration.image = UIImage(systemName: "star")  //图片
//        cell.contentConfiguration = contentConfiguration

        cell.todoLable.text = todos[indexPath.row].name
        return cell
    }
     
    

    /*
    // Override to support conditional editing of the table view.
    override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
        // Return false if you do not want the specified item to be editable.
        return true
    }
    */

    /*
    // Override to support editing the table view.
    override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
        if editingStyle == .delete {
            // Delete the row from the data source
            tableView.deleteRows(at: [indexPath], with: .fade)
        } else if editingStyle == .insert {
            // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
        }    
    }
    */
    //事件函数
    //当对每一行进行排序时需要调用的方法
    override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {

    }
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        
    }


    /*
    // Override to support conditional rearranging of the table view.
    override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
        // Return false if you do not want the item to be re-orderable.
        return true
    }
    */

    
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    

}

TodoCell:

import UIKit

class TodoCell: UITableViewCell {
    @IBOutlet weak var checkBoxBtn: UIButton!
    @IBOutlet weak var todoLable: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}

Todo:

import Foundation

struct Todo{   //结构体.struck:值类型,class:引用类型. strack不需要再额外写构造器,因为系统已经自动生成.
    var name: String   //文本
    var checked: Bool   //是否已经完成
}

//相当于class的:
//class Todo{
//    var name = ""
//    var checked = false
//    init(name: String, checked: Bool){
//        self.name = name
//        self.checked = checked
//    }
//}

启动测试:
在这里插入图片描述

6.实现checkBox这个Button被选中之后变色.

将Button的Tint改为Clear Color.使选中后的淡蓝色消失.
在这里插入图片描述在这里插入图片描述

TodosViewController:

import UIKit

class TodosViewController: UITableViewController {
    
    let todos = [
        Todo(name: "学习iOS课程的基础课", checked: false),
        Todo(name: "学习iOS课程的零基础赏月App开发", checked: false),
        Todo(name: "学习iOS课程的零基础木琴App开发", checked: false),
        Todo(name: "学习iOS课程的零基础和风天气App开发", checked: false),
        Todo(name: "学习iOS课程的零基础待办事项App开发", checked: false),
        Todo(name: "学习iOS课程的小红书App开发", checked: false)
    ]

    override func viewDidLoad() {
        super.viewDidLoad()

        // Uncomment the following line to preserve selection between presentations
        // self.clearsSelectionOnViewWillAppear = false

        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem
    }

    // MARK: - Table view data source
    //配置TableView的一些数据

    override func numberOfSections(in tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 1   //总共有1个分类
    }

    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return todos.count   //总共有10个待办事项
    }

    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {  //此函数会根据上面两个函数(总共分类数和总共待办事项数)返回的内容多次执行
        let cell = tableView.dequeueReusableCell(withIdentifier: kTodoCellID , for: indexPath) as! TodoCell

//        // Configure the cell...
//        //配置主标题的文本
//        var contentConfiguration = cell.defaultContentConfiguration()
//        contentConfiguration.text = "昵称"   //主标题
//        contentConfiguration.secondaryText = "个性签名"    //副标题
//        contentConfiguration.image = UIImage(systemName: "star")  //图片
//        cell.contentConfiguration = contentConfiguration

        
        cell.checkBoxBtn.isSelected = todos[indexPath.row].checked  //将cell的是否被选中属性改为todos的当前行的checked属性
        cell.todoLable.text = todos[indexPath.row].name
        return cell
    }
     
    

    /*
    // Override to support conditional editing of the table view.
    override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
        // Return false if you do not want the specified item to be editable.
        return true
    }
    */

    /*
    // Override to support editing the table view.
    override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
        if editingStyle == .delete {
            // Delete the row from the data source
            tableView.deleteRows(at: [indexPath], with: .fade)
        } else if editingStyle == .insert {
            // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
        }    
    }
    */
    //事件函数
    //当对每一行进行排序时需要调用的方法
    override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {

    }
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        
    }


    /*
    // Override to support conditional rearranging of the table view.
    override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
        // Return false if you do not want the item to be re-orderable.
        return true
    }
    */

    
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    

}


TodoCell:

import UIKit

class TodoCell: UITableViewCell {
    @IBOutlet weak var checkBoxBtn: UIButton!
    @IBOutlet weak var todoLable: UILabel!
    
    override func awakeFromNib() {   //每个cell加载出来之后执行的函数
        //dequeueReusableCell -> awakeFromNib -> dequeueReusableCell后面的内容
        super.awakeFromNib()
        // Initialization code
        checkBoxBtn.setImage(UIImage(systemName: "checkmark.circle.fill"), for: .selected)
        
    }//设定了当前button被选中之后里边的图片
    

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }

}

7.实现checkBox这个Lable被选中之后字体变灰色.

TodosViewController:

import UIKit

class TodosViewController: UITableViewController {
    
    let todos = [
        Todo(name: "学习iOS课程的基础课", checked: false),
        Todo(name: "学习iOS课程的零基础赏月App开发", checked: true),
        Todo(name: "学习iOS课程的零基础木琴App开发", checked: false),
        Todo(name: "学习iOS课程的零基础和风天气App开发", checked: false),
        Todo(name: "学习iOS课程的零基础待办事项App开发", checked: false),
        Todo(name: "学习iOS课程的小红书App开发", checked: false)
    ]

    override func viewDidLoad() {
        super.viewDidLoad()

        // Uncomment the following line to preserve selection between presentations
        // self.clearsSelectionOnViewWillAppear = false

        // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
        // self.navigationItem.rightBarButtonItem = self.editButtonItem
    }

    // MARK: - Table view data source
    //配置TableView的一些数据

    override func numberOfSections(in tableView: UITableView) -> Int {
        // #warning Incomplete implementation, return the number of sections
        return 1   //总共有1个分类
    }

    override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        // #warning Incomplete implementation, return the number of rows
        return todos.count   //总共有10个待办事项
    }

    
    override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {  //此函数会根据上面两个函数(总共分类数和总共待办事项数)返回的内容多次执行
        let cell = tableView.dequeueReusableCell(withIdentifier: kTodoCellID , for: indexPath) as! TodoCell

//        // Configure the cell...
//        //配置主标题的文本
//        var contentConfiguration = cell.defaultContentConfiguration()
//        contentConfiguration.text = "昵称"   //主标题
//        contentConfiguration.secondaryText = "个性签名"    //副标题
//        contentConfiguration.image = UIImage(systemName: "star")  //图片
//        cell.contentConfiguration = contentConfiguration

        
        cell.checkBoxBtn.isSelected = todos[indexPath.row].checked  //将cell的是否被选中属性改为todos的当前行的checked属性
        cell.todoLable.text = todos[indexPath.row].name
        cell.todoLable.textColor = todos[indexPath.row].checked ? .tertiaryLabel : .label   //三元运算符.根据是否被选中进行判断,如果被选中的话变成浅色,未被选中就是原来的Lable Color.
        return cell
    }
     
    

    /*
    // Override to support conditional editing of the table view.
    override func tableView(_ tableView: UITableView, canEditRowAt indexPath: IndexPath) -> Bool {
        // Return false if you do not want the specified item to be editable.
        return true
    }
    */

    /*
    // Override to support editing the table view.
    override func tableView(_ tableView: UITableView, commit editingStyle: UITableViewCell.EditingStyle, forRowAt indexPath: IndexPath) {
        if editingStyle == .delete {
            // Delete the row from the data source
            tableView.deleteRows(at: [indexPath], with: .fade)
        } else if editingStyle == .insert {
            // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
        }    
    }
    */
    //事件函数
    //当对每一行进行排序时需要调用的方法
    override func tableView(_ tableView: UITableView, moveRowAt fromIndexPath: IndexPath, to: IndexPath) {

    }
    override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
        
    }


    /*
    // Override to support conditional rearranging of the table view.
    override func tableView(_ tableView: UITableView, canMoveRowAt indexPath: IndexPath) -> Bool {
        // Return false if you do not want the item to be re-orderable.
        return true
    }
    */

    
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    

}

启动测试:

在这里插入图片描述

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

iOS开发Swift-12-列表UI,TableViewController,动态响应Button勾选-待办事项App(1) 的相关文章

  • 我如何用 javascript/jquery 进行两指拖动?

    我正在尝试创建当有两个手指放在 div 上时拖动 div 的功能 我已将 div 绑定到 touchstart 和 touchmove 事件 我只是不确定如何编写这些函数 就像是if event originalEvent targetTo
  • 奇怪的父/子NSManagedObjectContext现象

    我创建了两个这样的上下文 create writer MOC privateWriterContext NSManagedObjectContext alloc initWithConcurrencyType NSPrivateQueueC
  • 如何无限地每1分钟运行一个iOS应用程序?

    我制作了一个应用程序 需要每 1 分钟向服务器发送一次位置和状态更新 我尝试了以下方法 但没有一个能帮助我 有什么解决办法吗 1 NSTimer 很多人建议这样做 但问题出在后台模式上 它只能工作 20 分钟 该应用程序停止发送数据后 2
  • 当自定义子视图处理触摸时防止 UITableView 滚动

    在我的 iOS 应用程序中 有一个 UITableView 其中一个单元格中包含一个自定义子视图 该单元格是一个交互式视图 它处理触摸事件 touchesBegan touchesEnded touchesMoved 以更新自身 问题是 当
  • 在 Swift 中使用 commitEditingStyle 动态删除 UITable 部分

    我正在处理一个无法解决的问题 我有一个来自客户数据库数组的名称表 每个客户在其他数据成员中都有一个名称属性 我可以成功删除某个部分中的行 但我不能删除该部分 当该部分中的最后一行被删除时 该部分必须消失 I got NSInternalIn
  • 如何从日期中获取小时、分钟和上午/下午? [复制]

    这个问题在这里已经有答案了 我尝试从日期中提取小时 分钟和上午 下午 但我得到 NULL 输出 我在下面显示了我的代码 请查看 NSString dateStr 29 07 2013 02 00am NSDateFormatter form
  • 无法添加钥匙串项目。使用 KeychainItemWrapper 更改标识符后出现错误 - 25299?

    我想用 KeychainItemWrapper 将 UUID 保存在钥匙串中 所以我在中添加以下方法MyKeychainManager m define keychain idenentify com myapp bundle1 void
  • CMSampleBufferSetDataBufferFromAudioBufferList 返回错误 12731

    我正在尝试捕获应用程序声音并将其传递给 AVAssetWriter 作为输入 我正在设置音频单元的回调以获取 AudioBufferList 问题始于将 AudioBufferList 转换为 CMSampleBufferRef 它总是返回
  • malloc:***错误:已释放对象的校验和不正确 - 对象可能在释放后被修改

    我的 iOS 应用程序有一个大问题 它有时会崩溃 而没有详细的调试错误 堆栈跟踪为空 这是堆栈跟踪中仅有的两行 UIApplicationMain 中的 符号存根 UIHostedTextServiceSession DismissText
  • iOS 11 浮动 TableView 标题

    有一个应用程序包含多个部分 展开 时每个部分有几行 折叠 时没有 每个部分都有一个部分标题 使用以下子类重用它们UITableViewHeaderFooterView等等 到目前为止一切顺利 然后在 iOS 11 中 我使用了可视化调试器
  • NSDateFormatter:根据 currentLocale 的日期,不包含年份

    这不会太难吧 我想显示不带年份的日期 例如 8 月 2 日 美国 或 02 08 德国 它也必须适用于许多其他语言环境 到目前为止 我唯一的想法是对年份进行正常格式 然后从生成的字符串中删除年份部分 我认为你需要看一下 NSString d
  • 将语音添加到自定义 UIMenuController

    我创建了一个自定义UIMenuController in a UIWebView但它似乎摆脱了 说出选择 选项UIMenuController在那之后 所有测试设备上的 偏好设置 中都打开了发言选择选项 并且它出现在其他应用程序中 包括非
  • 使用prepareForSegue传递数据

    我试图将数据从viewController 1传递到viewController2 我有2个按钮和1个segue 因此有一个segue标识符 这2个按钮 按下时每个按钮应显示 1个标签用于显示标题 1个textView用于显示定义 我很难显
  • ios 11 - UIBarButtonItem 内的 UIButton 导致自动布局错误

    我在将 UIButton 添加到 UIBarButtonItem 时遇到了一个已知问题 我尝试按照建议添加自动布局约束堆栈溢出 https stackoverflow com a 46336639 505603但我收到如下所述的错误 UIB
  • 如何从 Firebase 同步检索数据?

    我有两个集合 即用户和问题 根据使用 userId 登录的用户 我检索currQuestion价值来自users收藏 基于currQuestion值 我需要检索question来自 Firebase 的文档Questions收藏 我使用下面
  • 如何在 Swift 中创建 UIAlertView?

    我一直在努力在 Swift 中创建 UIAlertView 但由于某种原因我无法得到正确的语句 因为我收到此错误 找不到接受提供的 init 重载 论点 我是这样写的 let button2Alert UIAlertView UIAlert
  • Xcode 在代码签名身份中看不到我的开发人员证书

    我续订了 IOS 开发人员证书 从钥匙串中删除了旧证书 然后单击了我的证书 钥匙串中的一切看起来都很正常 我有分发 开发人员 WWDC 证书 每个配置文件看起来都有效 并带有绿色标记 在组织器中的团队和配置文件部分下 但在代码签名身份下的
  • Swift 中的 viewWillLayoutSubviews

    我正在尝试翻译SKScene scene GameScene sceneWithSize skView bounds size 进入 swift 但我收到错误 sceneWithSize 不可用 使用对象构造 SKScene size 我在
  • 使用 nib 作为带有 nib 类的表节标题

    我想创建一个加载 nib 文件并将其设置为标题 UIView 的节标题 这个 nib 文件还将有一个关联的类 其中插座和操作连接到 因此我想像平常一样使用 nib 加载该类 我在网上搜索并找到了几个类似的答案 但我找不到任何适合我的答案 经
  • 选择 UITableViewCell 时 UIView 背景颜色消失

    我在界面生成器中构建了一个简单的 tableViewCell 它包含一个包含图像的 UIView 现在 当我选择单元格时 会显示默认的蓝色选择背景 但 UIView 的背景颜色消失了 我的 UITableViewCell 的实现文件没有做任

随机推荐

  • echarts地图map

    在vue中使用echarts绘制图表 npm install echarts save 全局安装echarts 具体代码及注释如下
  • mac上的matlab的设置工具箱cvx

    cvx的下载地址 http cvxr com cvx download 首先怎么做到在终端运行matlab程序呢 打开终端 vi bash profile 进行配置 加入 export PATH PATH Applications MATL
  • ixp协议服务器,ipx协议中的“内部网络号”是什么意思?

    1 IPX的协议构成 IPX协议簇包括如下主要协议 IPX 第三层协议 用来对通过互联网络的数据包进行路由选择和转发 它指定一个无连接的数据报 相当于TCP IP协议簇中的IP协议 SPX 顺序包交换 Sequenced Packet Ex
  • angular编译版本冲突解决办法总结

    刚刚涉足angular 对于node npm typescript等都不太熟悉 网上下载别人源码一编译 报一堆英文错误 死了的心都有了 先来感受一下吧 经过两天的踩坑 东看看 西查查 终于算是解决了目前项目的错误 虽然不知道为什么 但是可以
  • 三元运算符判断字符串是否为空

    有一个变量String userId 判断是否为null 如果为null 就赋值为空串 否则就不变 用if条件写是 if null userId userId 想用三元运算符写 常见错误写法 userId null userId 这样是错误
  • html禁止自动填充input表单的完美解决办法

    提交登陆等表单时 允许记录了密码则会保存起来 且每次都会自动填充入input 我们有时候不需要自动填充 试过网上的各种方法都没能完美解决 最后终于找到解决办法 废话不多说 直接上代码
  • STM8S105K4T6硬件IIC调试小结

    1 IIC初始化 具体时钟设置参考此篇文章 https blog csdn net u014397533 article details 46495905 void I2C Init void I2C CR1 0x00 禁止I2C外设 此句
  • 日本语语料库

    来自 日语语料库建设的现状综述 上海外国语大学 毛文伟 2009年 1 EDR语料库 EDR 该语料库由日本电子化辞书研究所开发 并于1995年推出 素材选自新闻报道和杂志 规模为 20 万句 另有 10 万 句左右的英语语料 在原始语料的
  • 深度学习图像融合 合成 协调笔记

    目录 图像合成最新资料汇总1 图像合成最新资料汇总2 图像渲染 pip install poetry
  • 【Espruino】NO.05 按键是你的仆人

    http blog csdn net qwert1213131 article details 27104341 本文属于个人理解 能力有限 纰漏在所难免 还望指正 小鱼有点电 按键 生活中随处可见 手机 电脑 家用电器 用来执行各种功能
  • Linux中用stat命令查看文件时3个时间点解析

    有些时候 我们需要使用stat命令来查看文件的详细信息 另外联想下 ls l命令显示的是什么时间 touch命令修改文件的时间戳 修改的又是什么时间 在这里我们一起来试验下 首先 我们来看下stat情况 如图所示 会出现3个类型的时间 分别
  • CPU时间与系统时间(CPU time and wall clock time)

    CPU时间是指一段程序在CPU上面运行消耗的时间 也是内核时间 kernel time 在Linux Unix系统里面 C 程序的COU时间可以用一些第三方的库提供的函数测出 但是在Windows系统里面 没有可以直接使用的第三方函数 在这
  • Session和Cookie实现购物车

    来自森大科技官方博客 http www cnsendblog com index php p 342 GPS平台 网站建设 软件开发 系统运维 找森大网络科技 http cnsendnet taobao com 使用Session和Cook
  • 自定义Mybatis框架

    目录 自定义Mybatis分析 轮子缺少的配件 组装轮子 制定骨架 解析配置文件 类关系梳理 创建默认实现类 实现基于注解的查询 目录结构 流程图 通过快速入门示例 Mybatis快速入门 我们发现使用 mybatis 是非常容易的一件事情
  • easyui dialog 子窗口jsp(被弹出窗口)调用父jsp页面方法操作父jsp

    父jsp monthDuty jsp 选中tab2 var selectTabByIndex function tabId tabs select 1 中间js文件 monthDutyJs js var dialog parent sunn
  • 「Linux-基础」CentOS 8 LVM逻辑卷管理

    LVM逻辑卷管理 枫梓林 提示 建议按着步骤来 文章目录 LVM逻辑卷管理 1 简介 2 建立LVM的步骤 3 逻辑卷管理及部署 1 磁盘分区 2 物理卷管理 建立物理卷 扫描物理卷 显示物理卷 删除物理卷 3 卷组管理 建立卷组 扫描卷组
  • STM32(HAL库)通过ADC读取MQ2数据

    目录 1 简介 2 CubeMX初始化配置 2 1 基础配置 2 1 1 SYS配置 2 1 2 RCC配置 2 2 ADC外设配置 2 3 串口外设配置 2 4 项目生成 3 KEIL端程序整合 3 1 串口重映射 3 2 ADC数据采集
  • 实验5-8 使用函数求圆台体积 (10 分)

    实验5 8 使用函数求圆台体积 10 分 本题要求实现函数求圆台体积 定义并调用函数volume tc r lower r upper h 计算下底半径为r lower 上底半径为r upper 高度为h的圆台的体积 函数类型是double
  • 卷积学习与传统稀疏编码、ICA模型学习区别(逐步补充)

    逐步总结 有待补充 无监督学习知识框架 这种分类不合适 稀疏编码等也可以从统计学角度看做模型学习与参数选择 实际上 稀疏编码是从1维信号发展起来的表示方法 近年来 稀疏编码逐渐引入信号的先验信息 由非模型向基于模型的转变 学习特色字典 单层
  • iOS开发Swift-12-列表UI,TableViewController,动态响应Button勾选-待办事项App(1)

    1 创建新项目 为项目添加图标 2 将Table View Controller添加到界面中 将箭头移动到Table View上来 代表它是首页 根页面 选中ViewController 点击Delete 对它进行删除 将代码ViewCon