【仅供内部供应商使用,不提供对外解答和培训】

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagecpp
[IFEntryViewController initWithPath:(NSString *)reportPath serverUrl:(NSString *)serverUrl viewType:(IFEntryViewType)viewType parameters:(NSDictionary *) params];

参数说明

参数名参数说明可否为空
reportPath报表的路径,例如:@"mobile.test.cpt"
serverUrl报表所在的服务器地址 
viewType预览类型。
IFEntryViewTypePage为分页
IFEntryViewTypeWrite为填报

表单为nil

 是
params报表传递的参数 是

4. 如果购买了决策系统,在移动端想查看决策系统的报表,又不想用FR默认的目录树结构,如何定制自己的目录树?

...

Code Block
languagecpp
[IFOEMUtils addServerWithName:(NSString *)serverName andURL:(NSString *)serverURL addUsername:(NSString *)username addPassword:(NSString *)password userEditable:(BOOL)userEditable];
参数说明
参数名参数说明是否可以为空
serverName服务器名称
serverURL服务器地址
username默认用户名
password默认密码
userEditable用户名、密码以及服务器名称地址是否允许用户修改

c. 关于页面的定制:

1.去除FR默认的关于页面:

...

Code Block
[IFOEMUtils setMessageHandler:(void (^) (NSString *message, BOOL isSuccess)) handler];
参数说明	
参数名参数说明
handler消息处理函数

Block参数说明

参数名参数说明
message消息内容
isSuccessYES表示只是提示;NO表示错误/警告

e. App右上角为设置按钮,支持放置自定义按钮:

...

然后在这个地方改成所申请的appid

并在app启动的时候,绑定appid

19.如何去除设置里的去评分等按钮

第一步,自定义右上设置按钮

Code Block
title自定义设置按钮
UIBarButtonItem *setting = [[UIBarButtonItem alloc] initWithTitle:@"设置" style:UIBarButtonItemStylePlain target:self action:@selector(setting)];    [IFOEMUtils setAppSettingBarButtonItem:setting];

第二步,定义设置按钮事件,打开我们内置的设置界面(不带去评分,联系我们等按钮),但是没有注销按钮(可自己实现)

Code Block
title打开FR设置界面
- (void) setting {
  //定义一个注销按钮
  IFFrameAppSettingItem *logoutItem = [[IFFrameAppSettingItem alloc] initWithTitle:@"注销" andAction:^(UITableViewCell *selectedCell) {
    //注销
    [IFIntegrationUtils logOut];
    //让页面消失,这里需要写一个获取当前最前端视图(当前就是设置界面)的方法,后面会有示例,也可以把设置页面在类里定义成变量能引用到。
    [[self topViewControllerWithRootViewController:[UIApplication sharedApplication].delegate.window.rootViewController] dismissViewControllerAnimated:YES   completion:nil];
  }];
 
  //把自定义注销按钮放大数组里,后面给创建设置页面使用
  NSArray *logOutSection = [[NSArray alloc] initWithObjects:logoutItem, nil];
  NSArray *customItems = [[NSArray alloc] initWithObjects:logOutSection, nil];
 
  //定义设置页面
  IIFFrameAppSettingViewController *settingViewController; = [[IFFrameAppSettingViewController alloc] initWithCustomItems:customItems];
  
  //根据手机/Pad设置不同的弹出方式
  BOOL isPhone = [[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone;
  UIViewController *topViewController = [self topViewControllerWithRootViewController:[UIApplication sharedApplication].delegate.window.rootViewController];
  if(isPhone) {
    [topViewController.navigationController pushViewController:settingViewController animated:YES];
  } else {
    UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:settingViewController];
    navigationController.modalPresentationStyle = UIModalPresentationFormSheet;
    [topViewController presentViewController:navigationController animated:YES completion:nil];
  }
}
//获取当前顶部视图
- (UIViewController*)topViewControllerWithRootViewController:(UIViewController*)rootViewController {
  if ([rootViewController isKindOfClass:[UITabBarController class]]) {
    UITabBarController* tabBarController = (UITabBarController*)rootViewController;
    return [self topViewControllerWithRootViewController:tabBarController.selectedViewController];
  } else if ([rootViewController isKindOfClass:[UINavigationController class]]) {
    UINavigationController* nav = (UINavigationController*)rootViewController;
    return [self topViewControllerWithRootViewController:nav.topViewController];
  } else if (rootViewController.presentedViewController) {
    UIViewController* presentedViewController = rootViewController.presentedViewController;
    if([presentedViewController isKindOfClass:[UIAlertController class]]) {
      return rootViewController;
    }
    return [self topViewControllerWithRootViewController:presentedViewController];
  } else {
    return rootViewController;
  }
}