문제

I use sdwebimage and ktphotobrowser for my thumbnail gallery. because I have different galleries I need many sources. But i can't change the datasource in the SDWebImageDataSource.m file

I made a variable named myStr and now i want to get it in the SDWebImageDataSource's init function so i can get data from another source

Is it possible or may I have a change create another function named initWithString then pass my path to that function?

in my viewcontroller I initialize the SDWebImageDataSource as SDWebImageDataSource *sd = [[SDWebImageDataSource alloc]init]; then i set variable sd.myStr=@"http://mypath.com";

but I can't get the value of myStr in the init function of SDWebImageDataSource.m file

도움이 되었습니까?

해결책

In Init method, initialize your string by setting an empty string. This will solve your problem. or if you can manage to create custom method [[SDWebImageDataSource alloc]initWithString:@"SOMESTRING"];will also be fine.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top