Post

Replies

Boosts

Views

Activity

Reply to Duplicate output file
I answer to myself.The error comes from using the automatic increment script of the Bundle version below. It copies the info.plist to the project.bundlePhase files, which creates a duplicate.Here is the script:#!/bin/bash bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") bN=$((bN += 1)) bN=$(printf "%d" $bN) /usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "$INFOPLIST_FILE"This script is from Jeffrey Jackson at CoderWall.comNote: this script run correctly with a new app created with the New Build System, not with older one. (It's my case)HTH
Mar ’20
Reply to Attributed text in TextView - Objective-c
Thanks a lot Claude31, it helps me.NSString *myRegularString = @"Title1\n\nBody1\n\nTitle2\n\nBody2" // Multiply the fontSize iPhone/iPad CGFloat fontSize; if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { fontSize = 1; } else { fontSize = 2; }In short, I added a calculation to know the length of the Body1 like this :NSMutableAttributedString *myStyledTxt = [[NSMutableAttributedString alloc] initWithString:myRegularString]; // Title1 NSRange range = [myRegularString rangeOfString:@"Title1" options:NSRegularExpressionSearch|NSCaseInsensitiveSearch]; if (range.location != NSNotFound) { // Transfer the styledTxt [myStyledTxt addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Futura-Bold" size:13 * fontSize] range:range]; [myStyledTxt addAttribute:NSForegroundColorAttributeName value:[UIColor systemGrayColor] range:range]; } // Compute the new range.location. NSUInteger newLocation = range.location + range.length + 1; // .\n\n // Compute the length of Body1, it is between end of Title1 and the begining of Title2 range = [myRegularString rangeOfString:@"iCarousel" options:NSRegularExpressionSearch|NSCaseInsensitiveSearch]; // Ajust range.location and range.length range.length = range.location - newLocation; range.location = range.location = newLocation; // Transfer the styledTxt [myStyledTxt addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"Futura" size:11 * fontSize] range:range]; [myStyledTxt addAttribute:NSForegroundColorAttributeName value:[UIColor systemGrayColor] range:range];That's seems to be ok.The Todo is to justified the bodies and have a foreground black/background white pour the titles and a foreground black/background clearGray for the bodies. The background should use the entire width.It was easier with IB :-)
Dec ’19