zoukankan      html  css  js  c++  java
  • 5.9-停诊场景引入出差

    弹层-成功页面

    jt-二次游泳-东来顺-三里屯-拥抱-阿迪达斯-牵手-公交站拥抱-电梯口一楼亲-到家亲

    半透明view上面添加白色 alertView  堆砌label, 约束写好,模型传文案,根据文案自适应高度   全部堆砌完毕,让白色View中心跟半透明遮罩背景相同即可

    2015.5.10

    1.F3-2 发布成功页UI 70%

    2.F2-2 停诊详情页UI做完, PTOffLineAnnounceModel 模型加字段

    3.F2-1 标签修改 调整标签的位置 右上->左下

    4.F2-3 标签修改, 旧页面逻辑整理, 调整UI

    2015.5.11

    1.F4-1 公告弹层UI .先写假高度,控件添加完毕计算真实高度, mas_update

    2.F4-2 发布成功页 跳转逻辑 右滑手势跳过一个控制器,在viewDidLoad里面 重设navControllers 数组

    3.F4-2 发布成功页,适配小屏幕,滚动,约束

    2015.5.12

    1.停诊信息接口

    2.停诊公告列表接口

    3.弹层代理,block回调

    2015.5.13

    1.alert加动画

    2.拉伸图片

    3.停诊信息设置成功调接口

    2015.5.14

    1.成功页禁用右滑动返回

    -------

    /**

     *  求字符串长度

     *

     *  @param text 字符串

     *

     *  @return 字符串宽度

     */

    -(float)(NSString *)text{

    //    CGSize size = [text sizeWithFont:[UIFont systemFontOfSize:kCellTextFont]constrainedToSize:CGSizeMake(MAXFLOAT,27)];

        CGSize size = [text sizeAutoFitIOS7WithFont:[UIFont systemFontOfSize:kCellTextFont] constrainedToSize:CGSizeMake(MAXFLOAT,27) lineBreakMode:NSLineBreakByCharWrapping];

        

    //    LOG(@"text---%@--size.width--%f",text,size.width);

        

        return size.width;

    }

     

     

    -----------

        HDFNet *net = [HDFNet shareInstance];

        [net postAddPath:DoctorUser_Bookingorder_ModifyTingzhen

              parameters:parameters

                 success:^(HDFNetResponse *response) {

                     [SVProgressHUD dismiss];

                     if (_isFromFaceDiaOrderList) {

                         UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"发布成功" message:@"如果停诊期间已有患者预约,医助会联系患者取消或更换时间" delegate:self cancelButtonTitle:nil otherButtonTitles:@"我知道了", nil];

                         alertView.tag = kFaceDiaOrderAlertTag;

                         [alertView show];

                     }

                     else{

                     [SVProgressHUD showSuccessWithStatus:@"发布成功"];

                     [self performSelector:@selector(popToAnnouceListViewController) withObject:nil afterDelay:0.5];

                     }

     

    发布成功后,performSelector pop控制器 延迟0.5s

    ------------------------------------------------------------------------------------------------

    先写上左右的约束, 不写高度约束,最后加高度约束

        // 蓝色虚线框imageView

        UIImageView *dottedLineImageView = [[UIImageView alloc]init];

        [self.bottomContainerView addSubview:dottedLineImageView];

        [dottedLineImageView mas_makeConstraints:^(MASConstraintMaker *make) {

            make.top.equalTo(self.bottomContainerView);

            make.left.equalTo(self.bottomContainerView).offset(25);

            make.right.equalTo(self.bottomContainerView).offset(-25);

        }];

        dottedLineImageView.image = [UIImage imageNamed:@"travelDoc_round"];

        [dottedLineImageView mas_updateConstraints:^(MASConstraintMaker *make) {

            make.bottom.equalTo(rightButton.mas_bottom).offset(15);

        }];

    -----

    scrollview不能滚动

    self.bottomContainerView = [[UIView alloc]init];

        [self.bgScrollView addSubview:self.bottomContainerView];

        [self.bottomContainerView mas_makeConstraints:^(MASConstraintMaker *make) {

            make.top.equalTo(self.offWorkReleaseLabel.mas_bottom).offset(35);

            make.left.right.equalTo(self.view);

    //        make.bottom.equalTo(self.bgScrollView); // 最后再加约束

        }];

    所有的控件都应该加到scrollView上.之前第二行写成了

        [self.view addSubview:self.bottomContainerView];

    -----

    滚动视图的标准写法

    1.设置四边约束     所有view添加到scrollView上, 不用设置contentSize, 不用设置代理

    UIScrollView *bgScrollView = [[UIScrollView alloc]init];

        [self.view addSubview:bgScrollView];

        [bgScrollView mas_makeConstraints:^(MASConstraintMaker *make) {

            make.edges.mas_equalTo(self.view);

        }];

    (如何只设置top.left,right,是不行的,更新约束意味着之前是已经有约束了)

    2.更新底边约束

        [bgScrollView mas_updateConstraints:^(MASConstraintMaker *make) {

            make.bottom.mas_equalTo(self.bottomContainerView.mas_bottom).offset(15);

        }];

    -----

    font.lineHeight * 0.4

    --------------------------------------------------------

    @property (nonatomic, strong) id model;

    -(void)setModel:(id)model

    {

        if ([model isKindOfClass:[PTOffLineAnnounceModel class]]) {

            _offLineAnnounceModel = model;

        }

        else if ([model isKindOfClass:[PTOnLineAnnounceModel class]])

        {

            _onLineAnounceModel = model;

        }

        [self configureUI];

    }

    // 一个控制器可能传两种模型

    --------------------------------------------------------------------------------

    先添加UI再用模型刷新UI

    --------------------------------------------------------------------------------

    按钮点击不能跳转

    因为按钮的父控件是图片,图片默认是不能交互的,所以设置图片可交互就行了

    ----------------------------------------------------------------------------------------------------

    崩溃信息: __NSArrayI removeObject

    谷歌百度搜索崩溃信息都能找到答案的,问题出在第一句代码,强制转换,但是vcs仍然是不可变数组,至是欺骗了编译器,实际还是不可变数组,所以

        NSMutableArray * vcs = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];

    用arrayWithArray写就不会崩溃了

    不同的内存空间 相当于alloc init

    // 右滑返回

    -(void)removeOffLineAnnounceEditViewController{

        NSMutableArray * vcs = (NSMutableArray *)self.navigationController.viewControllers;

        for (UIViewController * vc in self.navigationController.viewControllers) {

            if ([vc isKindOfClass:[OffLineAnnounceEditViewController class]]) {

                [vcs removeObject:vc];

                [self.navigationController setViewControllers:vcs animated:NO];

    //            self.navigationController.viewControllers = vcs;

            }

        }

    }

     

    ------------------------------------------------------------------------------------------

    /**

     *  拉伸图片,边缘不变形

     *

     *  @param image 被拉伸的图片

     *

     *  @return 拉伸完毕的图片

     */

    - (UIImage *)strenthImage:(UIImage *)image {

        CGFloat top = 31; // 顶端盖高度

        CGFloat bottom = 31 ; // 底端盖高度

        CGFloat left = 10; // 左端盖宽度

        CGFloat right = 10; // 右端盖宽度

        UIEdgeInsets insets = UIEdgeInsetsMake(top, left, bottom, right);

        // 指定为拉伸模式,伸缩后重新赋值

        return [image resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch];

    }

     

    ------------------------------

    最后更新约束不对

    之前没有的,可以用make加约束

    --------

     

    没显示备注

    用scrollView + label解决

    ------

  • 相关阅读:
    Moodle的安装和登陆(使用Https)
    Moodle 3.4中添加小组、大组、群
    【转】moodle中年级、班级、小组研讨
    函数式接口
    java实现数据库连接池
    转载---jboss简单使用
    转载---数据库优化方案
    转载---虚拟机类加载机制
    java中的hashcode
    父子类静态代码块,非静态代码块,有参,无参构造方法等的执行顺序问题
  • 原文地址:https://www.cnblogs.com/tufei7/p/5496908.html
Copyright © 2011-2022 走看看