Aug 2, 2013 02:25
- (void)noteSectionHeader:(UTNoteSectionHeader *)noteSectionHeader sectionTapped:(NSInteger)section
{
NSMutableArray* delete = [NSMutableArray new];
NSMutableArray* add = [NSMutableArray new];

NSInteger previousItemIndex = self.selectedSection;

/* Check if a section is opened */
if (self.selectedSection != NSNotFound) {
/* A section is open, get the item */
UTNoteItem* theItem = self.notes[self.selectedSection];
/* if the item is the section opened, close it */
if (self.selectedSection == section) {
Aug 2, 2013 02:25
Wuhu.. fix'd with this code:
Aug 2, 2013 02:12
Thanks :)
Aug 2, 2013 02:12
+1 and the mark
Aug 2, 2013 02:11
For now the most important is done thanks to you
Aug 2, 2013 02:11
yes, I guess. This will be another topic for tommorow maybe :)
Aug 2, 2013 02:09
hehe
Aug 2, 2013 02:08
yes still gets that glowy effect though :(
Aug 2, 2013 02:07
ye
Aug 2, 2013 02:07
so no left or right
Aug 2, 2013 02:07
It should look like you are expanding the contents of the selected "note"
Aug 2, 2013 02:06
hmm, hard to tell :p
Aug 2, 2013 02:04
Everything that is reloaded will fade out while a new instance is fading in, which result in a light effect.
Aug 2, 2013 02:03
With the glowing effects and everything :p
Aug 2, 2013 02:03
Yes, just looks horrible :p
Aug 2, 2013 02:03
that code works
Aug 2, 2013 02:03
NSMutableIndexSet* reloadSet = [[NSMutableIndexSet alloc] init];
/* Check if a section is opened */
if (self.selectedSection != NSNotFound) {
/* A section is open, get the item */
UTNoteItem* theItem = self.notes[self.selectedSection];
/* if the item is the section opened, close it */
if (self.selectedSection == section) {
theItem.selected = NO;
[reloadSet addIndex:section];
self.selectedSection = NSNotFound;

}
/* The item is not the section, so open it, and close the previous item */
else {
theItem.selected = YES;
Aug 2, 2013 01:58
And it works in my master branch, but when I edited my model to not know about the headerView it turned out to become a nightmare
Aug 2, 2013 01:57
I used the deletePaths etc because they showed it in a wwdc movie
Aug 2, 2013 01:56
One moment
Aug 2, 2013 01:56
:)
Aug 2, 2013 01:55
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString* cellIdentifier = @"TitleCell";

UTNoteTableViewCell* cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];

UTNoteItem* item = [self.notes objectAtIndex:indexPath.section];

cell.noteText.text = item.text;
return cell;
}
Aug 2, 2013 01:55
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{

if (self.selectedSection == section) {
return 1;
}
return 0;
}
Aug 2, 2013 01:55
I try to use your reloadSections method now in every case
Aug 2, 2013 01:54
much easuer
Aug 2, 2013 01:54
arh chat :)
Aug 2, 2013 01:52
Works on the first click, when I click another section it fails again :(
Aug 2, 2013 01:52
I will edit my question. Maybe I forgot to tell you that I only wish one section open at a time
Aug 2, 2013 01:52
I actually don't use rows as "headers". I use sections as my main headers. So my row count is 0 until one section is tapped. then it should be 1 (for now)
 

iPhone / iPad

Apple iOS development chat. This room has a FAQ at ios-develop...
Jul 29, 2013 15:17
Hi guys. I just ran into a little problem. I am trying to do an expandable uitableview, and the way I expand the cells is by having a bool indicating if it is the selected cell. If selected the heightForIndexrow returns a constant higher value than the standard. However that is not very sutable if the contentview is larger than the constant expand size. Let me know if I am not clear enough. So the question is, are there any alternatives?
Jul 29, 2013 15:12
Can I ask a question in here?
Jul 29, 2013 14:54
hi
 

Lounge<C++>

Today we're daydreaming about C++26 reflection
Apr 28, 2012 17:34
how can i modify the keyboard layout
Apr 28, 2012 17:34
yes but would the response be faster if I used SendKeys
Apr 28, 2012 17:31
Just wanted to know if it would be faster to use SendKeys method than using autohotkey to do the trick
Apr 28, 2012 17:31
Well. I want to make a script which would simulate a space pressed when i press the a key fx.
Apr 28, 2012 17:26
Hey guys. a fast q. Would it be faster to use c++ to bind keys to another key than using autohotkey to do the trick. What I want is when I press a it should press space instead e.g.
 

Flex & ActionScript

All issues related to flash, flex and as3
Mar 3, 2012 22:00
Can I ask questions about as3 in here?