Questions tagged [nsmutableattributedstring]
357 questions
0
votes
1 answer
Changing NSAttributedString text value for a UIControl
Currently all my buttons and textfields have attributedText values defined to be attributed strings.
Consider the case with a simple UILabel. Whenever I have to change the text for this UILabel (based on some user action), I have to redefine the…

p0lAris
- 4,750
- 8
- 45
- 80
0
votes
1 answer
IOS NSMutableAttributedString crash EXC_BAD_ACCESS
I have a problem that I hope that you can help me.
I use NSMutatableAttributedString to load html in UILabel but all time the application crash on
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
self.attrStr =…

Houssam
- 125
- 1
- 12
0
votes
2 answers
Writing NSMutableAttributedString to rtf file could not open?
My tried code is given below:-
#define FontFamily(fname,fsize) [UIFont fontWithName:fname size:fsize]
#define themeRed [UIColor colorWithRed:189.0f/255.0f green:0.0f/255.0f blue:12.0f/255.0f alpha:1]
#define helveticaBold…

Prince Kumar Sharma
- 12,591
- 4
- 59
- 90
0
votes
0 answers
MutableAttributedString concatenation
I have tried to concatenate to attributed string with different properties,But not reflecting any changes,Here my code
//White color
NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithData:[[NSString…

Fazil
- 1,390
- 2
- 13
- 26
0
votes
1 answer
How can I word wrap with NSMutableAttributedString?
NSArray *myArray = @[@"1st:array1",
@"2nd:array2",
@"3rd:array3"
];
NSString *labelString = [myArray componentsJoinedByString:@"\n"];
In this codelabelStringcan be word wrapped.
But if…

Penguin
- 863
- 1
- 9
- 22
0
votes
1 answer
Multiple text alignment with same label using NSMutableAttributedString on iOS
I want to set Text direction for my label using NSMutableAttributedString. for example, I have chat view, which contains message and time. I want to set left alignment for message and right alignment for time using UILabel.
I have used following…

Pankti Patel
- 178
- 1
- 9
0
votes
2 answers
Comparing 2 of the same NSAttributedStrings not working
Why does comparing the same NSAttributedString not work?
I have the following:
- (void)someSetupClass {
NSMutableAttributedString *aString = [[NSMutableAttributedString alloc] initWithString:@"abcdefghijklmnopqrstuvwxyz"];
[aString…

cdub
- 24,555
- 57
- 174
- 303
0
votes
1 answer
NSMutableAttributedString Crashing App
I'm doing something wrong with the range (I think) in setting this NSMutableAttributedString. Can anyone tell me why this is crashing my program? It looks right to me, but I'm obviously wrong! Thanks.
NSString *placeHolderString =…

AndroidDev
- 20,466
- 42
- 148
- 239
0
votes
1 answer
Issue with NSMutableAttributedString
We are currently in beta testing of a new app where i am getting some crashes that i don't understand. It doesn't happen on my device or simulator, but does crash on a few devices in the field we have deployed for testing. The code related to…

Andrew Phillips
- 937
- 1
- 7
- 19
0
votes
1 answer
How can I scan a string for numbers to adjust the font size in an iOS app?
I'm off to a good start. But I would like to make this code more dynamic.
NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:string];
UIFont *font = [UIFont systemFontOfSize:10.0f];
UIFont *smallFont = [UIFont…

JZ.
- 21,147
- 32
- 115
- 192
0
votes
2 answers
Create an NSMutableArray of NSRange's and properly read the range values later
I am trying to create an NSMutableArray of the ranges discovered from NSRegularExpression, but I cannot get the NSMutableArray to hold objects. Help?
Declare the array by: NSMutableArray *matches = [[NSMutableArray alloc]init];
At the end of my…

momodude22
- 112
- 1
- 10
0
votes
1 answer
-[NSConcreteMutableAttributedString _UIKBStringWideAttributeValueForKey:]: message sent to deallocated instance 0x11ba0740
I have an app where app is getting crashed when I click on textfield in iOS6. The crash occurs saying below message.
-[NSConcreteMutableAttributedString _UIKBStringWideAttributeValueForKey:]: message sent to deallocated instance 0x11ba0740
I have…

Fahim Parkar
- 30,974
- 45
- 160
- 276
0
votes
0 answers
Update NSMutableAttributedString in another class
I have a UIButton class with a NSMutableAttributedString as the title (for the formatting).
I would like to now change the titleColor of the button text from my vc class because it has been'selected'.
I can do it fine as a normal button title. But…

malaki1974
- 1,605
- 3
- 16
- 32
0
votes
0 answers
Setting strokeColor clears the NSMutableAttributedString specially in iOS 7.0
I am getting problem in displaying the NSMutableAttributedString in iOS 7.0 where as working well in other versions. Specially this problem is due to stroke colour when map_zoomLevel value increases over 14, when i remove stroke colour from it, it…

Ravi Gupta
- 175
- 2
- 11
0
votes
1 answer
How to add attributes to an Empty TextView?
In my app i have a UITextView and in the inputAccessory view i have a few buttons which can let the user type in Bold, Italics etc.
When I tap the bold button i am adding the attribute for bold font but there is no text in the UItextView so the…

Ashutosh
- 5,614
- 13
- 52
- 84