ios - How to put different headIndent (alignment) for every paragraph in UITextView -


In my application, I should align the all paragraphs

Like, the first paragraph has head indent 0.0f, then another 10.0 f and third 3.0f

I have all the paragraph styles on textview.attributedText This will only come with the Dynamically typing text here This means that the user will see the text view Write in Sing Therefore, there is no static string to do this.

I am placing all the letters in UITtexView ...

  UIFont * fontBold = [UIFont fontWithName: @ "Helvetica-Bold" Size: 15]; Attribute HallTeckled = @ {NSFontAttributeName: fontBold}; UIFont * fontNormal = [UIFont fontWithName: @ "helvetia new-light-light" Size: 15]; Attributes = normal = @ {NSFontAttributeName: fontNormal}; If (varBold == 1) {[textView setting properties: attributesHeltyCalled]; } And {{textView settyping properties: attributes general]; }   

And I want to get this kind of result in the text view

While typing I'm typing slow down

But I think I will come to that point, but right now For this I got stuck on this alignment problem.

How to do this when the bullet point comes and when the different text comes

Any kind of link, code, tutorial will be very helpful ...

---------- Edit: ----------

Please take a look into the applications for Evernote . < Br> I need the only thing in my app when the bullets come in for alignment of second, third, etc. line

-------- Edit after search: -------

I've searched a lot for it but this is not to find anything by Googling.
Now, now I'm asking that somebody now A paragraph style or an attribute of the paragraph How to style and just leave it as it is on the text view and the second paragraph At this time, the first paragraph will not throw the "Change Change Text Invenment" method.

Yes, whatever I am saying is quite confusing.

So I explain this in general ...

If the user sets the head of the first paragraph of the first paragraph of Indent = 7.0 f, then the user will type the next paragraph And the head indent = 13.0 f will remain in the form of the first paragraph because it is in textview and only the paragraph is running will come in a chapter (a method means).

Now I should style for each paragraph ChangeTextInRange method.

  varStaringPointOfString = 0; VarEndingPointOfString = 0; NSArray * sampleArrToGetattrStr = [txtViewOfNotes.text ComponentsSparedBeacEactors Inset: [NSCharacterSet newlineCharacterSet]]; (INTI = 0; I & lt; [SampleArtaOggetttraTrag]; I ++) {NSSTING * Strotostor lang = [NSSTING stringWate format: @ "% @", [Sample ARTOttetsatettrettAtandX: I]]; VarStaringPointOfString = (integer) strtostoreLength.length + varEndingPointOfString; If ([strotor lang heffex: @ "\ tâ ?? ¢ \ t"]) {[textView text store] addAttribute: NSParagraphStyleAttributeName value: paragraph styleforobullet category: nsmcrange (varEndingPointOfString, strtostoreLength.length)]; } And {{textView textStorage] addAttribute: NSParagraphStyleAttributeName Value: Paragraph Normal Category: NSMakeRange (varEndingPointOfString, strtostoreLength.length)]; } VarEndingPointOfString = varStaringPointOfString; StrtostoreLength = @ ""; }   

But the speed of typing has slowed down.

Try it out: NSMutableParagraphStyle * Paragraph Style = [[Graph on graphical [NSMutable] Eloc] Init]; [Paragraph style setFirstHeadlineHide Indent: FirstLine Indend]; // Only the first line [paragraph style set manually indent: head indent]; // Exclude the first one, the remaining rows [add your assistant string attribute: nspair graph style attribute name: paragraph style range: paragraph range];

For a bullet point, it's something different where you want the bullet point, and according to it, you have to set another indent accordingly.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -