//
//  FaqDetailViewController.m
//  OneCable
//
//  Created by nComz on 2017. 4. 21..
//  Copyright © 2017년 ntels. All rights reserved.
//

#import "FaqDetailViewController.h"
#import "ModeModel.h"
#import "CustomButton.h"
#import "Definitions.h"

@interface FaqDetailViewController ()

@end

@implementation FaqDetailViewController
@synthesize faqModel,detail_count;

- (void)viewDidLoad {
    [super viewDidLoad];

    [self initUI];
    [self connectDetailUrl];
}

- (void)connectDetailUrl {
    NSString *detail_url = [NSString stringWithFormat:@"%@%@%@%@",kAPIServer,API_ROOT_PATH,API_GET_FAQ_DETAIL,faqModel.faqId];
    
    NSURL* url = [NSURL URLWithString:detail_url];

    NSURLRequest* urlRequest = [NSURLRequest requestWithURL:url];
    
    [_m_webView loadRequest:urlRequest];
}

- (void)initUI {
    _m_webView.scrollView.bounces = NO;
    
    _lblTitle.text = faqModel.title;
    _lblCount.text = [NSString stringWithFormat:@"%@%@",detail_count,@"."];
}

- (IBAction)btnCloseTouched:(id)sender {
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];

}

@end
