-
Notifications
You must be signed in to change notification settings - Fork 8
/
AdDataModel.m
47 lines (37 loc) · 995 Bytes
/
AdDataModel.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// AdDataModel.m
// 广告循环滚动效果
//
// Created by QzydeMac on 14/12/20.
// Copyright (c) 2014年 Qzy. All rights reserved.
//
#import "AdDataModel.h"
#define PLISTFILENAME @"AdDataPlist.plist"
#define PATH [[NSBundle mainBundle]pathForResource:PLISTFILENAME ofType:nil]
@implementation AdDataModel
- (instancetype)initWithImageName
{
self = [super init];
if (self)
{
_imageNameArray = [NSArray arrayWithContentsOfFile:PATH][0];
}
return self;
}
- (instancetype)initWithImageNameAndAdTitleArray
{
_adTitleArray = [NSArray arrayWithContentsOfFile:PATH][1];
return [self initWithImageName];
}
+ (id)adDataModelWithImageName
{
return [[self alloc]initWithImageName];
}
+ (id)adDataModelWithImageNameAndAdTitleArray
{
return [[self alloc]initWithImageNameAndAdTitleArray];
}
@end
// 版权属于原作者
// http://code4app.com (cn) http://code4app.net (en)
// 发布代码于最专业的源码分享网站: Code4App.com