Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting an Issue in appending the value of one string to another string in iphone
    text
    copied!<p>I have an application in which I am trying to append the value of a string in another string variable and then display that string variable in the detailtextlabel of tableview.but my query is my string is not getting appended properly.What may be the issue.This is my code:</p> <pre><code>-(void)viewWillDisappear:(BOOL)animated { repeatArray = [[NSMutableArray alloc] init]; repeatArray = [[NSUserDefaults standardUserDefaults]objectForKey:@"week"]; if (sun &amp;&amp; mon &amp;&amp; tue &amp;&amp; wed &amp;&amp; thu &amp;&amp; fri &amp;&amp; sat) { app.repeat =@"Every day"; } else if (mon &amp;&amp; tue &amp;&amp; wed &amp;&amp; thu &amp;&amp; fri &amp;&amp; !sat &amp;&amp; !sun) { app.repeat = @"Every Week days"; } else if (sat &amp;&amp; sun &amp;&amp; !mon &amp;&amp; !tue &amp;&amp; !wed &amp;&amp; !thu &amp;&amp; !fri) { app.repeat = @"Every Weekends"; } else if (sun || mon || tue || wed|| thu || fri || sat) { if (sun) { app.repeat = @"Every Sunday"; NSLog(@"weekday:%@",app.repeat); } if (mon) { app.repeat= @"Every Monday"; NSLog(@"weekday:%@",app.repeat); } if(tue) { app.repeat = @"Every Tuesday"; NSLog(@"weekday:%@",app.repeat); } if(wed) { app.repeat = @"Every Wednesday"; NSLog(@"weekday:%@",app.repeat); } if(thu) { app.repeat = @"Every Thursday"; NSLog(@"weekday:%@",app.repeat); } if(fri) { app.repeat = @"Every Friday"; NSLog(@"weekday:%@",app.repeat); } if(sat) { app.repeat = @"Every Saturday"; NSLog(@"weekday:%@",app.repeat); } } } </code></pre> <p>All this is working is fine .But I select mon and tue then only every Tuesday is displayed.Instead "Every Mon,Tue " displayed.</p> <p>Please help me in solving this.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload