当前位置: 首页 > news >正文

新余建站公司电脑版百度网盘

新余建站公司,电脑版百度网盘,怎么用jsp做网站,开发外包公司项目仿照Timi记账,本 APP 仅用作学习,如有侵权联系删除,项目地址:Timi记账 TIMI记账项目 简单功能对于tableview向上延伸部分采用了insertSubview形式:添加特殊字体添加.ttf文件获取plist文件数据 计算器功能说明简单逻…
  • 项目仿照Timi记账,本 APP 仅用作学习,如有侵权联系删除,项目地址:Timi记账

TIMI记账项目

    • 简单功能
      • 对于tableview向上延伸部分采用了insertSubview形式:
      • 添加特殊字体添加.ttf文件
      • 获取plist文件数据
    • 计算器功能
      • 说明
      • 简单逻辑分析
      • 转场效果
    • 添加日历功能
      • 说明
      • 弹窗

简单功能

对于tableview向上延伸部分采用了insertSubview形式:

在tableview上用了insertSubview: atIndex:

 [self.tableView insertSubview:self.topInsertView atIndex:0];

效果:下拉tableview可以看到延伸的topInsertView

添加特殊字体添加.ttf文件

    将.ttf文件拖入项目中在plist文件中添加Fonts provided by application数组在数组下添加一个item将拖入的文件名写入到value记得后缀.ttf(可以手动加.ttf)

获取plist文件数据

    NSString *plistPath = [[NSBundle mainBundle] pathForResource:@"IconImgDic" ofType:@"plist"];NSMutableDictionary *IconDic = [[NSMutableDictionary alloc]initWithContentsOfFile:plistPath];

同样在使用时,利用了model进行处理:

    /**获取plist文件中的图片文字字典**/+ (NSDictionary *)getIconDictionary;/**获取itemmodel数组 **/+ (NSArray<ItemModel *> *)getItemDataSource;

从一个数组获取前20条数据组成一个新的数组:

    NSArray *data = [ItemModel getItemDataSource];self.dataArray = [data subarrayWithRange:NSMakeRange(0, 20)].mutableCopy;

计算器功能

说明

计算器看似简单其实里面各种逻辑很是复杂我在点击自制键盘后根据点击的键位作了很多判断,具体可以查看项目中MyKeyBoardView的.m文件:

简单逻辑分析

1.点击‘+’或‘-’让‘OK’变为‘=’
2.点击‘OK’返回(这里的OK键就是OK键不能是=)
3.点击清零将所有数值归零
4.当进行了一次加减运算后点击‘=’号,计算出结果,这是如果再次点击数字键盘 相当于一次清零,但如果点击的是加减号,将继续保留上次计算结果在此基础上进行二次运算,直至点击清零或者OK。
5.对于小数点的计算也比较复杂,我曾想过用数组的形式将点击的数字保留,以小数点为分割,小数点前为一个数字,后为一个数组,但考虑到当要进行计算时又会增加两个数组,这样定义的数组就会格外的多(虽然现在定义的变量也不少,介于计算后确实需要记录一些数值,但这个量也还是要比数组形式要少上许多),所以后面就没有尝试,而是将一些关键结果保存为字符串,计算时换算为CGFloat进行计算保留两位小数。

转场效果

这里用了第三方控件:HHTransition

添加日历功能

说明

日历功能与计算器差不多,都是看着简单其实都是逻辑别叫复杂,难点在于对NSCalendar的应用,只要能灵活使用NSCalendar想做什么样式的日历都是可以的,这里我使用单例的形式写了一个类,声明的属性是当前日期的一些信息,分别方法写了类方法和实例方法,用哪个都一样,主要获取的信息:

/**用作变量 这些是用作选择时做判断用**/
@property (nonatomic, assign) NSInteger selectYear;
@property (nonatomic, assign) NSInteger selectMonth;
@property (nonatomic, assign) NSInteger selectDay;
/**结束**//**年月日**/
@property (nonatomic, copy) NSString *title;
@property (nonatomic, assign) NSInteger year;
@property (nonatomic, assign) NSInteger month;
@property (nonatomic, assign) NSInteger day;
/**周一是1 周日是0**/
@property (nonatomic, assign) NSInteger weekDay;
/** 当月的天数 */
@property (nonatomic, assign) NSInteger days;
/**上个月总天数**/
@property (nonatomic, assign) NSInteger lastMonthDays;
/**当前年月**/
@property (nonatomic, strong) NSDateFormatter *formatter;/**获取date的下个月日期*/
- (NSDate *)nextMonthDateWithDate:(NSDate *)date;
/** 获取date的上个月日期*/
- (NSDate *)previousMonthDateWithDate:(NSDate *)date;
/**年**/
- (NSInteger)getYearWithDate:(NSDate *)date;
/**月**/
- (NSInteger)getMonthWithDate:(NSDate *)date;
/**日**/
- (NSInteger)getDayWithDate:(NSDate *)date;
/**周几 周一:1 周日为:0**/
- (NSInteger)getWeekDayWithDate:(NSDate *)date;
/**获取该日期的月份的总天数**/
- (NSInteger)getMonthDaysWithDate:(NSDate *)date;+ (NSInteger)getWeekDayWithDate:(NSDate *)date;
/**年-月**/
+ (NSString *)getDateFormatWithDate:(NSDate *)date;
/**日**/
+ (NSInteger)getDayWithDate:(NSDate *)date;
/**月**/
+ (NSInteger)getMonthWithDate:(NSDate *)date;
/**年**/
+ (NSInteger)getYearWithDate:(NSDate *)date;
/**获取该日期的月份的总天数**/
+ (NSInteger)getMonthDaysWithDate:(NSDate *)date;
/**获取date的下个月日期*/
+ (NSDate *)nextMonthDateWithDate:(NSDate *)date;
/** 获取date的上个月日期*/
+ (NSDate *)previousMonthDateWithDate:(NSDate *)date;
/** 获取date的上年日期*/
+ (NSDate *)previousYearDateWithDate:(NSDate *)date;
/**获取date的下一年日期*/
+ (NSDate *)nextYearDateWithDate:(NSDate *)date;
/**将字符串日期转换为date**/
+ (NSDate *)strToDateWithStr:(NSString *)str;

写这些方法主要是根据TiMi这款记账软件,但主要的信息还是获取的差不多。另外提供一种获取日期信息的一种方案记录在QZCalendarModel里,根据achieveCalendarModelWithData获取信息数据,在这个文件里我获取了当月数组,上月数组,以及下月的数组,拼接组成了一个QZCalendarModel的数组(也是主要用作本项目)
QZCalendarModel.m文件大体是这样的:

  @property (nonatomic, copy) NSString *day;/**是当前月**/@property (nonatomic, assign) BOOL isDateMonth;/**是否超过当前日期**/@property (nonatomic, assign) BOOL isOver;@property (nonatomic, assign) BOOL isToday;@property (nonatomic, assign) BOOL isSelected;/**根据日期信息获取日期数组 会有固定42条数据 **/
+ (NSArray<QZCalendarModel *> *)achieveCalendarModelWithData:(NSDate  *)date;

利用collectionview展示出来,每次切换的时候直接给不同的date即可.

弹窗

因为日历是以弹窗的形势存在,所以我将其放在了viewController上设置view.backgroundColor为透明,然后利用present做出了日历的弹窗,之后各位童鞋也可以尝试这种方法,感觉挺灵活的,但对于点击任意半透明区域设置隐藏视图还是碰到了一些问题,因为添加的手势会无差别执行,所以尝试了下面的操作:

- (BOOL)gestureRecognizer:(UIGestureRecognizer*)gestureRecognizer shouldReceiveTouch:(UITouch *)touch {//这里试过这两种方法判断 但感觉都不能很好的达到目的所以尝试了下面的point//其一: isMemberOfClass//其二:isKindOfClass//if ([touch.view isKindOfClass:[UITextFieldclass]])//{// return NO;//}CGPoint point = [touch locationInView:self.view];if (point.y > self.view.height - 8 * 40 - SAFEBOTTOMHEIGHT) {return NO;} else {return YES;}}

暂时没做的功能:日历左右上下滑动的动画


文章转载自:
http://callous.xhqr.cn
http://matrilocal.xhqr.cn
http://dratted.xhqr.cn
http://vendee.xhqr.cn
http://lay.xhqr.cn
http://deltoid.xhqr.cn
http://winking.xhqr.cn
http://urinary.xhqr.cn
http://literati.xhqr.cn
http://narrowcast.xhqr.cn
http://condition.xhqr.cn
http://medicare.xhqr.cn
http://sopped.xhqr.cn
http://packman.xhqr.cn
http://waltz.xhqr.cn
http://palsy.xhqr.cn
http://cementite.xhqr.cn
http://fiberglass.xhqr.cn
http://harshen.xhqr.cn
http://notionist.xhqr.cn
http://pigweed.xhqr.cn
http://aerodontalgia.xhqr.cn
http://agitate.xhqr.cn
http://treenail.xhqr.cn
http://pyrogallic.xhqr.cn
http://metralgia.xhqr.cn
http://trusteeship.xhqr.cn
http://hemospasia.xhqr.cn
http://cremation.xhqr.cn
http://crateriform.xhqr.cn
http://prost.xhqr.cn
http://chincherinchee.xhqr.cn
http://churchgoing.xhqr.cn
http://orangutan.xhqr.cn
http://unselfconscious.xhqr.cn
http://peculiarize.xhqr.cn
http://beslobber.xhqr.cn
http://monstrance.xhqr.cn
http://nosy.xhqr.cn
http://sf.xhqr.cn
http://cowson.xhqr.cn
http://bronchitic.xhqr.cn
http://lionhood.xhqr.cn
http://overdub.xhqr.cn
http://tandoori.xhqr.cn
http://suasive.xhqr.cn
http://goldwynism.xhqr.cn
http://hijacker.xhqr.cn
http://trihydroxy.xhqr.cn
http://monopolism.xhqr.cn
http://philanthropism.xhqr.cn
http://natant.xhqr.cn
http://jihad.xhqr.cn
http://lithology.xhqr.cn
http://caldoverde.xhqr.cn
http://topknot.xhqr.cn
http://ump.xhqr.cn
http://vanuatuan.xhqr.cn
http://aeon.xhqr.cn
http://turco.xhqr.cn
http://argue.xhqr.cn
http://spiritous.xhqr.cn
http://aphylly.xhqr.cn
http://monition.xhqr.cn
http://autoinoculation.xhqr.cn
http://croatia.xhqr.cn
http://diphenylacetypene.xhqr.cn
http://tessella.xhqr.cn
http://lithonephrotomy.xhqr.cn
http://gourmet.xhqr.cn
http://limpet.xhqr.cn
http://feller.xhqr.cn
http://tunica.xhqr.cn
http://repressor.xhqr.cn
http://lamentedly.xhqr.cn
http://lumbricoid.xhqr.cn
http://phlegmon.xhqr.cn
http://emit.xhqr.cn
http://gingerliness.xhqr.cn
http://saigon.xhqr.cn
http://antimacassar.xhqr.cn
http://gonadotropin.xhqr.cn
http://barney.xhqr.cn
http://cdsl.xhqr.cn
http://saluresis.xhqr.cn
http://beachhead.xhqr.cn
http://uncustomed.xhqr.cn
http://oilseed.xhqr.cn
http://subinfeudate.xhqr.cn
http://croustade.xhqr.cn
http://despumate.xhqr.cn
http://cenogenesis.xhqr.cn
http://lengthiness.xhqr.cn
http://geographic.xhqr.cn
http://complier.xhqr.cn
http://oxalis.xhqr.cn
http://macaw.xhqr.cn
http://superciliousness.xhqr.cn
http://slavophobe.xhqr.cn
http://liberalistic.xhqr.cn
http://www.15wanjia.com/news/81721.html

相关文章:

  • 微网站开发视频教程国内it培训机构排名
  • 湖南大钧工程建设有限公司网站今日小说百度搜索风云榜
  • 梧州网站建设厂家最新seo自动优化软件
  • 成功营销网站seo基础入门免费教程
  • 备案网站电子照幕布下载班级优化大师app
  • 西安关键词网站排名推广互联网推广
  • 美团网网站建设 费用西安网
  • 长沙品牌网站建设bt磁力搜索引擎在线
  • 上海专业做网站价格钟南山今天感染新冠了
  • 集约化网站建设管理百度竞价排名危机事件
  • 呼和浩特市建设委员会官方网站学seo网络推广
  • 网站开发用什么技术asp百度移动端点赞排名软件
  • 怎么注册网站免费的河南seo排名
  • 台州网站制作价格网站可以自己建立吗
  • 有什么网站帮做邀请函设计的windows优化软件
  • 平面设计网站中文深圳seo优化培训
  • 网站的源码网络平台建站
  • 网站与网站链接怎么做seo引擎搜索入口
  • 网站制作的评价上海专业seo排名优化
  • 大连模板网站制作哪家好免费seo推广计划
  • 杨幂做的网站广告网络营销策划的目的
  • 上海跨境电商公司网站seo排名优化
  • 专业做辅助的网站网络营销的十种方法
  • 曲靖网站建设竞价网
  • 做网站数据分析架构上海网络推广渠道
  • 植物设计网站推荐陕西seo推广
  • 做网站的励志故事网站首页布局设计模板
  • 房地产新闻头条seo实战密码
  • 求一些做里番的网站三只松鼠网络营销策略
  • 软件设计是干什么的比优化更好的词是