한국어

스마트폰앱

온누리070 플레이스토어 다운로드
    acrobits softphone
     온누리 070 카카오 프러스 친구추가온누리 070 카카오 프러스 친구추가친추
     카카오톡 채팅 상담 카카오톡 채팅 상담카톡
    
     라인상담
     라인으로 공유

     페북공유

   ◎위챗 : speedseoul


  
     PAYPAL
     
     PRICE
     

pixel.gif

    before pay call 0088 from app


IASKSettingsStoreFile.m 파일 을 딕셔너리에저장
IASKSettingsStore.m 셋팅값을 저장동작

IASKSettingsStoreUserDefaults ///NSUserDefaults standardUserDefaults 에 키 밸류 값을 저장
- (void)setBool:(BOOL)value forKey:(NSString*)key { [[NSUserDefaults standardUserDefaults] setBool:value forKey:key]; }
//////////////////////////////////////////////////////////////////////////////////////////////////////////
settingsBundle 파일을 읽어온다음 밸류 어레이와 키 어레이에 저장
locateSettingsFile   .plist 섹션과  파일을 읽어온다

IASKSettingsReader.m

linphone-iphone/Classes/Utils/InAppSettingsKit/Models/IASKSettingsReader.m

#import "IASKSettingsReader.h"
#import "IASKSpecifier.h"

@interface IASKSettingsReader (private)
- (void)_reinterpretBundle:(NSDictionary*)settingsBundle; //
- (BOOL)_sectionHasHeading:(NSInteger)section;//
- (NSString *)platformSuffix;
- (NSString *)locateSettingsFile:(NSString *)file;//

@end

@implementation IASKSettingsReader

@synthesize path=_path,
localizationTable=_localizationTable,
bundlePath=_bundlePath,
settingsBundle=_settingsBundle, 
dataSource=_dataSource,
hiddenKeys = _hiddenKeys;

- (id)init {
return [self initWithFile:@"Root"];// 함수호출 initWithFile Root.plist 불러들임
}

- (id)initWithFile:(NSString*)file {
if ((self=[super init])) {


self.path = [self locateSettingsFile: file];//파일위치
[self setSettingsBundle:[NSDictionary dictionaryWithContentsOfFile:self.path]];// 셀프의 셋팅번들파일을지정 setSettingsBundle
self.bundlePath = [self.path stringByDeletingLastPathComponent];//패스컴포넌트를 삭제 stringByDeletingLastPathComponent = 경로명임 라스트컴포넌트 즉파일명을 제외하고의미
_bundle = [NSBundle bundleWithPath:[self bundlePath]];//번들과 패스

// Look for localization file. //현지화언어 존재확인
self.localizationTable = [self.settingsBundle objectForKey:@"StringsTable"];//self.settingsBundle 에서 StringsTable 가져오기
if (!self.localizationTable)
{
// Look for localization file using filename
self.localizationTable = [[[[self.path stringByDeletingPathExtension] // removes '.plist'결국 . plist 삭제
stringByDeletingPathExtension] // removes potential '.inApp'
   lastPathComponent] // strip absolute path
  stringByReplacingOccurrencesOfString:[self platformSuffix] withString:@""]; // removes potential '~device' (~ipad, ~iphone)
if([_bundle pathForResource:self.localizationTable ofType:@"strings"] == nil){
// Could not find the specified localization: use default
self.localizationTable = @"Root";
}
}

if (_settingsBundle) {
[self _reinterpretBundle:_settingsBundle];
}
}
return self;
}

- (void)dealloc {
_path = nil;
_localizationTable = nil;
_bundlePath = nil;
_settingsBundle = nil;
_dataSource = nil;
_bundle = nil;
_hiddenKeys = nil;
}

///////////////////////////////////////////

읽어들인 딕셔너리의 요소를 분류 리턴

IASKSpecifier.m

// setSpecifierDict xxxx,plist

#import "IASKSpecifier.h"
#import "IASKSettingsReader.h"

@interface IASKSpecifier ()
@property(nonatomic, strong) NSDictionary *multipleValuesDict;
- (void)_reinterpretValues:(NSDictionary*)specifierDict;
@end


@implementation IASKSpecifier

@synthesize specifierDict=_specifierDict;
@synthesize multipleValuesDict=_multipleValuesDict;
@synthesize settingsReader = _settingsReader;

- (id)initWithSpecifier:(NSDictionary*)specifier {
    if ((self = [super init])) {
        [self setSpecifierDict:specifier];///setSpecifierDict 에 specifier 저장
        
        if ([[self type] isEqualToString:kIASKPSMultiValueSpecifier] || [[self type] isEqualToString:kIASKPSTitleValueSpecifier]) {//멀티밸류 타잍틀밸류
            [self _reinterpretValues:[self specifierDict]]; //_reinterpretValues 함수를이용 밸류 어래이 와 타이틀 어래이에 저장
        }
    }
    return self;
}


- (void)_reinterpretValues:(NSDictionary*)specifierDict {
    NSArray *values = [_specifierDict objectForKey:kIASKValues];
    NSArray *titles = [_specifierDict objectForKey:kIASKTitles];


- (NSInteger)multipleValuesCount {
    return [[_multipleValuesDict objectForKey:kIASKValues] count];
}

- (NSArray*)multipleValues {
    return [_multipleValuesDict objectForKey:kIASKValues];
}

- (NSArray*)multipleTitles {
    return [_multipleValuesDict objectForKey:kIASKTitles];
}

- (NSString*)file {
    return [_specifierDict objectForKey:kIASKFile];
}

- (id)defaultValue {
    return [_specifierDict objectForKey:kIASKDefaultValue];
}

- (id)defaultStringValue {
    return [[_specifierDict objectForKey:kIASKDefaultValue] description];
}

조회 수 :
8419
등록일 :
2022.06.19
20:05:31 (*.128.199.207)
엮인글 :
http://www.webs.co.kr/index.php?document_srl=3348782&act=trackback&key=27a
게시글 주소 :
http://www.webs.co.kr/index.php?document_srl=3348782
List of Articles
번호 제목 글쓴이 날짜 조회 수sort
5 linphone-iphone account code analysis admin 2022-06-11 8414
4 Linphone-iphone AssistantView code analysis admin 2022-06-22 8405
3 linphone-iphone sourcecode SideMenuView code analysis admin 2022-06-14 8345
2 Linphone-iphone SettingsView code analysis admin 2022-06-18 8325
1 linphone-iphone/Settings/InAppSettings.bundle/ plist file list code analysis admin 2022-06-16 8245