Git Product home page Git Product logo

jhform's People

Contributors

iotjin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jhform's Issues

自定义view 不显示,是怎么回事

JhFormCellModel *Section1_cell1 = JhFormCellModel_AddCustumALLViewCell(100);
Section1_cell1.Jh_custumALLViewBlock = ^(UIView * _Nonnull allView) {
//allView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 100);
UIButton * imageBtn = [UIButton buttonWithType:UIButtonTypeCustom];
imageBtn.frame = CGRectMake(0, 0, 100, 100);
imageBtn.titleLabel.lineBreakMode = 0;//这句话很重要,不加这句话加上换行符也没用
imageBtn.titleLabel.textAlignment = NSTextAlignmentCenter;
imageBtn.titleLabel.numberOfLines = 0;
[imageBtn setTitle:[NSString stringWithFormat:@"+添加图片(可无)"] forState:UIControlStateNormal];
imageBtn.backgroundColor = [UIColor yellowColor];
[imageBtn addTarget:self action:@selector(chageBtnImage:) forControlEvents:UIControlEventTouchUpInside];
self.imageBtn = imageBtn;
[allView addSubview:imageBtn];

        UIButton * deleteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        deleteBtn.frame = CGRectMake(70, 0, 30, 30);
        deleteBtn.hidden = YES;
        [deleteBtn setImage:[UIImage imageNamed:@"compose_picture_add"] forState:UIControlStateNormal];
        deleteBtn.backgroundColor = [UIColor redColor];
        [deleteBtn addTarget:self action:@selector(delebtn) forControlEvents:UIControlEventTouchUpInside];
        [imageBtn addSubview:deleteBtn];
        self.deleteBtn = deleteBtn;
    };

你样例Demo 中显示,但是在我的项目工程中还是不显示。

改变cell的高度

重新设置cell的高度,发现cell中的标题已经内容都不是居中显示,比如textView在cell增高时,内容显示无法居中

在作为子控制器添加的时候,TableView位置显示位置向下偏移。

在作为子控制器添加的时候,TableView位置向下偏移,因为导航高度写为固定的。

JhFormConst.h 第26行
#define Jh_NavHeight (Jh_StatusBarHeight + Jh_ContentNavBarHeight)

JhFormTableViewVC.m 第97行
tableView.frame = CGRectMake(0, Jh_NavHeight, Jh_ScreenWidth, Jh_ScreenHeight-Jh_NavHeight-Jh_BottomSafeHeight);

能否提供接口,修改这个值?
或许可以修改为更灵活的接入方式。

可以增加选择视频和音频功能吗?

你好,框架十分好用,十分感谢,但是项目需求要可以上传视频和音频,我只是一个刚学iso3个月的小菜鸡,还只能用用别人写好的东西,如果能实现的话,万分感谢!

可能内存泄漏JhFormTableView

继承 JhFormTableViewVC

  • (void)viewDidLoad {
    [super viewDidLoad];

    [self setNav];
    [self initModel];

}

  • (BOOL)hidesBottomBarWhenPushed{
    return YES;
    }

#pragma mark - setNav
-(void)setNav{

self.Jh_navTitle = @"帮助中心";

// self.Jh_hiddenDefaultFooterView = YES;
self.view.backgroundColor = [UIColor whiteColor];
self.Jh_formTableView.backgroundColor = [UIColor whiteColor];
self.Jh_formTableView.separatorColor = [UIColor clearColor];

}
#pragma mark - initModel
-(void)initModel{
__weak typeof(self) weakSelf = self;

NSMutableArray *cellArr0 = [NSMutableArray array];
JhFormCellModel *cell1 = JhFormCellModel_AddRightArrowCell(@"常见问题", @"");

self.Jh_submitStr = @"我要反馈";
self.Jh_submitBtn.backgroundColor = defaultThemeColor;
self.Jh_formSubmitBlock = ^{
    NSLog(@" 点击提交按钮 ");

};

[cellArr0 addObjectsFromArray: @[cell1]];
JhFormSectionModel *section0 = JhSectionModel_Add(cellArr0);

[self Jh_addSectionModel:section0];
}

添加这个到模型数组 [self Jh_addSectionModel:section0]; ,不添加这句不提示。
第三方检测工具MLeaksFinder 提示
Possibly Memory Leak.
In case that JhFormTableView should not be dealloced, override -willDealloc in JhFormTableView by returning NO.
View-ViewController stack: (
HelpCenterViewController,
UIView,
JhFormTableView
)

真机调度偶尔会出现获取不到图片的问题

JhFormCellModel *cell7 = JhFormCellModel_AddImageCell(title, NO);
cell7.Jh_tipsInfo =@"长按可以调整图片顺序";
cell7.Jh_titleTextColor = [UIColor redColor];
[cellArr0 addObjectsFromArray: @[cell3,cell7]];
JhFormSectionModel *section0 = JhSectionModel_Add(cellArr0);
[self.Jh_formModelArr addObject:section0];
self.JhClickNavRightItemBlock = ^{
//这里我已经选择图片了,但是有时候他会是空的.。不知道是怎么回事。
NSLog(@" 99999选择图片类 - Jh_selectImageArr: %@ ",cell7.Jh_selectImageArr)
};

有重用问题

当表单上有多个按钮样式cell切换更改数据源 会出现重用问题

VC作为子控制器,tableView的宽不是屏幕宽时,右边按钮图标坐标和右侧箭头重叠了

JhFormTableViewVC *tableViewVC = [[JhFormTableViewVC alloc]init];

tableViewVC.Jh_formTableView.frame = CGRectMake(15, 15, IPHONE_WIDTH-30, 45*6);
[self addChildViewController:tableViewVC];
[self.view addSubview:tableViewVC.view];
[tableViewVC didMoveToParentViewController:self];

JhFormCellModel *cell0 = JhFormCellModel_AddRightArrowCell(VSLocalizedString(@"ADD_STAFF_PHOTO"), @"");

这种情况右按钮图片会和右箭头重叠

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.