Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FULiveDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -4200,7 +4200,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 41;
CURRENT_PROJECT_VERSION = 50;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 35A6KD62ZJ;
Expand Down Expand Up @@ -4267,7 +4267,7 @@
CLANG_WARN_DOCUMENTATION_COMMENTS = NO;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 41;
CURRENT_PROJECT_VERSION = 50;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_ASSET_PATHS = "";
DEVELOPMENT_TEAM = 35A6KD62ZJ;
Expand Down
2 changes: 2 additions & 0 deletions FULiveDemo/AppSupportFiles/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<string>1.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
Binary file modified FULiveDemo/Lib/FURenderKit.framework/FURenderKit
Binary file not shown.
3 changes: 3 additions & 0 deletions FULiveDemo/Lib/FURenderKit.framework/Headers/FUMakeup.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ NS_ASSUME_NONNULL_BEGIN
*/
- (void)updateMakeupPackage:(FUItem * __nullable)makeupPackage needCleanSubItem:(BOOL)needCleanSubItem;

//修改整体妆容程度值
@property (nonatomic, assign) double intensity;

////组合装对象,内部包含当前组合装所有部位子妆
//@property (nonatomic, strong, nullable) FUItem *makeupPackage;

Expand Down
Binary file modified FULiveDemo/Lib/FURenderKit.framework/Info.plist
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ - (void)itemsViewDidSelectedItem:(NSString *)item indexPath:(NSIndexPath *)index
image = [weak.segmentManager.segment readFirstFrame];
}
if (image) {
model.iconImage = image;
[weak.segmentManager saveModel: model];
[weak saveImg:image withName:CUSTOMBG];
} else {
//未获取当前录像的第一帧,移除自定义背景
Expand Down
21 changes: 16 additions & 5 deletions FULiveDemo/Modules/Beauty/FUAPIDemoBar/FUBeautyView.m
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,26 @@ - (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collection
}


BOOL selected = _selectedIndex == indexPath.row ;

BOOL selected = _selectedIndex == indexPath.row ;

if (selected) {
imageName = opened ? [modle.mTitle stringByAppendingString:@"-3"] : [modle.mTitle stringByAppendingString:@"-2"] ;
}else {
imageName = opened ? [modle.mTitle stringByAppendingString:@"-1"] : [modle.mTitle stringByAppendingString:@"-0"] ;
}

/* icon 未找到, 尝试处理 多语言图片 */
UIImage *imageIcon = [UIImage imageWithName:imageName];
if (imageIcon == nil) {
if (selected) {
imageName = opened ? [modle.mTitle stringByAppendingString:@"-3.png"] : [modle.mTitle stringByAppendingString:@"-2.png"] ;
imageName = opened ? [modle.mTitle stringByAppendingString:@"-3"] : [modle.mTitle stringByAppendingString:@"-2"] ;
}else {
imageName = opened ? [modle.mTitle stringByAppendingString:@"-1.png"] : [modle.mTitle stringByAppendingString:@"-0.png"] ;
imageName = opened ? [modle.mTitle stringByAppendingString:@"-1"] : [modle.mTitle stringByAppendingString:@"-0"] ;
}
imageIcon = [UIImage localizedImageWithName:imageName countrySimple:nil];
}

cell.imageView.image = [UIImage imageWithName:imageName];
cell.imageView.image = imageIcon;
cell.titleLabel.text = FUNSLocalizedString(modle.mTitle,nil);
cell.titleLabel.textColor = _selectedIndex == indexPath.row ? [UIColor colorWithHexColorString:@"5EC7FE"] : [UIColor whiteColor];
}
Expand Down
7 changes: 7 additions & 0 deletions FULiveDemo/Modules/Beauty/FUAPIDemoBar/UIImage+demobar.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,11 @@

@interface UIImage (demobar)
+ (UIImage *)imageWithName:(NSString *)name;

/**
* 适配图片多语言文案问题
* countrySimple 国家简写标识, countrySimple == nil,获取系统分配的国家语言简写标识, countrySimple == @""表示不加国家简写后缀
* 多语言图片适配规则 name + '_' + countrySimple, 图片命名必须严格按照该规则 'Style7-3_en'
*/
+ (UIImage *)localizedImageWithName:(NSString *)name countrySimple:(NSString *)countrySimple;
@end
25 changes: 25 additions & 0 deletions FULiveDemo/Modules/Beauty/FUAPIDemoBar/UIImage+demobar.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,29 @@ + (UIImage *)imageWithName:(NSString *)name {
return image;
}

/**
* 适配图片多语言文案问题
* countrySimple 国家简写标识, == nil,获取系统分配的国家语言简写标识
*/
+ (UIImage *)localizedImageWithName:(NSString *)name countrySimple:(NSString *)countrySimple {
UIImage *image = [UIImage imageNamed:name inBundle:[NSBundle bundleForClass:FUAPIDemoBar.class] compatibleWithTraitCollection:nil];
if (image) {
return image;
}

if (countrySimple == nil) {
NSDictionary *dic = [NSLocale componentsFromLocaleIdentifier:[NSLocale currentLocale].localeIdentifier];
NSString *kCFLocaleLanguageCodeKey = [dic objectForKey:NSLocaleLanguageCode];
countrySimple = kCFLocaleLanguageCodeKey;
}

if (countrySimple.length == 0) {
image = [UIImage imageNamed:name];
} else {
// * 多语言图片适配规则 name + '_' + countrySimple, 图片命名必须严格按照该规则 'Style7-3_en'
image = [UIImage imageNamed:[NSString stringWithFormat:@"%@_%@",name,countrySimple]];
}
return image;
}

@end
Loading