ios - Loading localized xib file from resource bundle (not main) -


i have created resource bundle using cocopad contains localized strings, images , xib files. have no problem loading localized strings , images having problem loading xib files using similar approach. here 1 of methods tried:

nsstring *nibname = @"mytestviewcontroller"; nsbundle *resourcebundle = [nsbundle bundlewithurl:[[nsbundle mainbundle]   urlforresource:@"mytestresources"                                                        withextension:@"bundle"]];   nsstring* path= [resourcebundle pathforresource:@"en" oftype:@"lproj"]; nsbundle* nibbundle = [nsbundle bundlewithpath:path];  return [[mytestviewcontroller alloc] initwithnibname:nibname bundle:nibbundle]; 

i got 'nsinternalinconsistencyexception', reason: 'could not load nib in bundle: 'nsbundle (not yet loaded)' name

i have printed out files in nibbundle , file there.

i saw in apple developer web site

in uikit, applications can load nib files main bundle , fewer options needed. want know if there other alternatives.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -