iOS开发——扫码界面实现
发表于|更新于
|浏览量:
类似下面这样一个收款界面的实现
界面分析
- 黑色半透明背景
- navgationBar下面绿色的那个headerView
- 扫码框,及绿色动态扫码线的实现
- 扫码框下面的提示文字
黑色背景的实现,可能跟想象的不同,见下图(图中的1/2/3只是标识不同部分,不是顺序),先是需要放一个backView,然后是放中间的扫码框3,再然后上下左右四个1,最后放headerView和提示文字2;
实现
文章作者: 今是昨非
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 今是昨非的博客!
相关推荐
2021-09-03
iOS 15导航栏设置
iOS 15导航栏设置背景使用Xcode 13.0运行项目到iOS 15的手机上,出现导航栏黑色。但是在低版本Xcode 运行到手机就没有问题。 修改设置方法需修改,参考barTintColor not working in iOS 15 原来设置导航栏代码不变,新增设置UINavigationBarAppearance实例对象的属性,然后赋值到全局的 navigationBar 或者单个页面的 navigaitonBar 属性中,取决于项目的设置是全局 NavigationBar 还是单个页面设置(可参考iOS StatusBar 设置)。 代码如下: 123456789101112131415161718- (void)updateNavigationBarColor:(UIColor *)color { UINavigationBar *bar = self.navigationController.navigationBar; if (@available(iOS 13.0, *)) { UINavigationBarAp...
2026-01-21
连夜开发了一个 Mac 上久坐提醒工具
背景看到# Mac 端,定时提醒休息,求安利想到自己也需要一个类似的提醒,所以连夜让AI开发了一个,哈哈哈,附加了喝水和提肛提醒(被指到的要提肛10下)。。。 实现界面如下,目前还在审核中。。。 参考
2021-08-18
Flutter布局基础——BottomNavigationBar
Flutter布局基础——BottomNavigationBar背景Flutter中BottomNavigationBar类似于 iOS 中的UITabbarController,是导航控制器的一种,常用于首页 Tab 切换。 BottomNavigationBar的 type 属性,默认值会根据items的个数而定;当items个数小于4个时,默认值为BottomNavigationBarType.fixed;当items个数大于等于4个,默认值为BottomNavigationBarType.shifting。 两种效果对比如下:左侧为BottomNavigationBarType.fixed,右侧为BottomNavigationBarType.shifting 常用属性如下: backgroundColor: 背景色 currentIndex: 当前选中哪一个 fixedColor: 选中 Item 的颜色 iconSize: 图片大小 items: 子元素 onTap: 点击事件 selectedFontSize: 选中字体大小 select...
2022-04-21
Algorithem_Merge Two Binary Trees
Algorithem_Merge Two Binary TreesYou are given two binary trees root1 and root2. Imagine that when you put one of them to cover the other, some nodes of the two trees are overlapped while the others are not. You need to merge the two trees into a new binary tree. The merge rule is that if two nodes overlap, then sum node values up as the new value of the merged node. Otherwise, the NOT null node will be used as the node of the new tree. Return the merged tree. Note: The merging process must...
2021-07-27
Flutter布局基础——Card
Flutter布局基础——CardCard,卡片式布局,带有一点圆角和阴影。通常用于关联信息的展示,比如:相册信息、经纬度、联系人信息等等。 Card的使用来看一下,如何做一个,常见的列表元素的控件,左侧是个Icon,上面是title,然后是desc,最下面是按钮,常见于订单列表。 要实现的效果如下: 然后看如何实现: ListTile这里需要介绍一下ListTile,Flutter提供的固定高度的,左侧或右侧带有Icon以及文案的控件。 可实现效果如下: 代码如下: 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( home...
2022-04-24
Algorithem_PermutationInString
Algorithem_PermutationInStringGiven two strings s1 and s2, return true if s2 contains a permutation of s1, or false otherwise. In other words, return true if one of s1’s permutations is the substring of s2. Example 1: 1234Input: s1 = "ab", s2 = "eidbaooo"Output: trueExplanation: s2 contains one permutation of s1 ("ba"). Example 2: 12Input: s1 = "ab", s2 = "eidboaoo"Output: false 解法首先理解 Permutation的意思,题目需要的是 s2包含 s1中字符串的任意一种排列,就返回 true,否则返...
公告
This is my Blog