ViewWillAppear but nothing
First: excuse me but I don't see tag for code
I have a problem, I have a tabBar / NavigationBar application. I try to use viewWillAppear but nothing. If I put a simple NSLog the console not show. Where is the problem?
-(void)viewDidLoad {
[super viewDidLoad];
[self readArgFromDatabaseSottoArgomenti];
[self VisualizzaPreferiti];
- (void)viewWillAppear:(BOOL)animated {
NSLog(@"test");
[self VisualizzaPreferiti];
[self.tableView reloadData];
-(void) readArgFromDatabaseSottoArgomenti {
databasePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"ARGOMENTI.sqlite"];
sqlite3 *databaseDesc;
// Init the argoments Array
arraySottoArgomenti = [[NSMutableArray alloc] init];
// Open the database from the users filessytem
if(sqlite3_open([databasePath UTF8String], &databaseDesc) == SQLITE_OK) {
// Setup the SQL Statement and compile it for faster access
// const char *sqlStatement = "select * from DESCRIZIONE ";
const char *sqlStatement = [[NSString stringWithFormat:@"SELECT * from DESCRIZIONE ORDER BY id"] UTF8String];
sqlite3_stmt *compiledStatement;
if(sqlite3_prepare_v2(databaseDesc, sqlStatement, -1, &compiledStatement, NULL) == SQLITE_OK) {
// Loop through the results and add them to the feeds array
while(sqlite3_step(compiledStatement) == SQLITE_ROW) {
// Read the data from the result row
NSString *aID = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 0)];
NSString *aIDArgomento = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 1)];
NSString *aDescrizione = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 2)];
NSString *aTesto = [NSString stringWithUTF8String:(char *)sqlite3_column_text(compiledStatement, 3)];
// Create a new argoments object with the data from the database
ContenutoObjectDescrizione *contenutoSottoArgomenti = [[ContenutoObjectDescrizione alloc] initWithName:aID idArgomento:aIDArgomento descrizione:aDescrizione testo:aTesto];
[arraySottoArgomenti addObject:contenutoSottoArgomenti];
[contenutoSottoArgomenti release];
// Release the compiled statement from memory
sqlite3_finalize(compiledStatement);
sqlite3_close(databaseDesc);
- (void) VisualizzaPreferiti {
int i;
NSUserDefaults *userPref = [NSUserDefaults standardUserDefaults];
array = [userPref objectForKey:@"array"];
NSLog(@"Retain Count %d Numero ID Array %d",[array retainCount],[array count]);
NSMutableArray *arrayOggettoPreferito;
arrayOggettoPreferito = [[NSMutableArray alloc] init];
ContenutoObjectDescrizione *oggetto = [[ContenutoObjectDescrizione alloc] init];
for (oggetto in arraySottoArgomenti) {
for (i=0; i<[array count]; i++) {
if ([[array objectAtIndex:i] intValue] == [oggetto.id intValue]) {
[arrayOggettoPreferito addObject:oggetto];
NSLog(@"ID %@ IDMateria %@ Titolo %@",oggetto.id,oggetto.idArgomento,oggetto.descrizione);
listaPref = arrayOggettoPreferito;
arrayOggettoPreferito=nil;
[arrayOggettoPreferito release];
[oggetto release];
#pragma mark -
#pragma mark Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
return 1;
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return [listaPref count];
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
ContenutoObjectDescrizione *oggettoCercato = [[ContenutoObjectDescrizione alloc] init];
oggettoCercato = [listaPref objectAtIndex:[indexPath row]];
cell.textLabel.text = oggettoCercato.descrizione;
NSLog(@"%@",oggettoCercato.descrizione);
return cell;
#pragma mark -
#pragma mark Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
TestoViewController *testoViewController = [[TestoViewController alloc] initWithNibName:@"TestoView" bundle:nil];
[self.navigationController pushViewController:testoViewController animated:YES];
ContenutoObjectDescrizione *oggettoCercato = [[ContenutoObjectDescrizione alloc] init];
oggettoCercato = [listaPref objectAtIndex:[indexPath row]];
testoViewController.idPreferito = oggettoCercato.id;
testoViewController.title = oggettoCercato.descrizione;
NSString *descrizioneWeb = oggettoCercato.testo;
NSString *path = [[NSBundle mainBundle] bundlePath];
NSURL *baseURL = [NSURL fileURLWithPath:path];
[testoViewController.vistaWeb loadHTMLString:descrizioneWeb baseURL:baseURL];
[testoViewController release];
#pragma mark -
#pragma mark Memory management
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
// Relinquish ownership any cached data, images, etc that aren't in use.
- (void)viewDidUnload {
// Relinquish ownership of anything that can be recreated in viewDidLoad or on demand.
// For example: self.myOutlet = nil;
- (void)dealloc {
[sup
er dealloc];
yes, but I solved
the problem was that I use these scheme
RootViewController
- UITabBarController
-- UINavigationController (1 for each tab)
--- MyUIViewController
instead
RootViewController(UITabBarController)
- UINavigationController (1 for each tab)
-- MyUIViewController
now it work!
Similar Messages
-
ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW
ADOBE CLOUD ON MY DESKTOP WILL NOT WORK. IT LOADS UP BUT NOTHING FILLS THE WINDOW
BLANK Cloud Screen http://forums.adobe.com/message/5484303 may help
-and step by step http://forums.adobe.com/thread/1440508?tstart=0
-and http://helpx.adobe.com/creative-cloud/kb/blank-white-screen-ccp.html -
How can I get the iCloud/iTunes password for my (now) deceased Father-in-Law's iMac? I have a list of his passwords, but nothing works! I know his email, but that account has been cancelled for security purposes, so we can't just request a new one. I tried his security questions to no avail.
ThanksSince that password is tied to his Apple ID, you will need to contact Apple; as far as I know, it will be a somewhat lengthy procedure and you will need to furnish necessary paperwork (including a death certificate as far as I know). Best to either stop at an Apple store or call them to find out exactly what it is you need to do.
-
Actually I couldn't use internet for approx 1 year. I thought My every detail is safe on FF server Now. when I am trying to sync my details in old sync, in first few attempt it can't login, but eventually it successfully logs in. but nothing is synching. So tried the same thing in New Synch. but When I try to login with same details It says unknown account. So I thought making new account with same id would overwrite data with new one. so I didn't. If there is any way I can get my data back, atleast some of it. As its quite important.
It's "safe" when you use it as intended, for synchronizing Firefox data between multiple devices. Sync was not intended to be used as you tried to use it; as a backup medium or "cloud".
-
cannot send or receive yahoo mail or gmail from iPhone . installed ios 6 recently. tried rebooting the phone and deleting the email account and adding again but nothing works ! can someone suggest a solution?
Not sure about yahoo, but for gmail, I done the following:
Set up using Exchange on iPhone, it'll keep prompting for password. On PC use captcha option, log in to gmail account from PC after completingg captcha option, enter password on iPhone.
See how that goes for gmail, let us know.
Hopefully someone will have fix for yahoo. -
if you can help me please alguin
Adobe Creative Cloud because I do not get After Effects among others but I try to install software from the page but I give After Effects download shareware and says downloading but nothing comes give him retrying but nothing even leave the application of Adobe Creative but nothing helpWithout proper system info and otehr technical details nobody can tell you anything.
Mylenium -
My ipad will not start. It is 1 year old...I have tried holding the two buttons and nothing..I have it connected to my desktop and it will make a ding noise but nothing comes up on the screen.
Frozen or unresponsive iPad
Resolve these most common issues:
• Display remains black or blank
• Touch screen not responding
• Application unexpectedly closes or freezes
http://www.apple.com/support/ipad/assistant/ipad/
iPad Frozen, not responding, how to fix
http://appletoolbox.com/2012/07/ipad-frozen-not-responding-how-to-fix/
iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
Black or Blank Screen on iPad or iPhone
http://appletoolbox.com/2012/10/black-or-blank-screen-on-ipad-or-iphone/
What to Do When Your iPad Won't Turn On
http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
iOS: Not responding or does not turn on
http://support.apple.com/kb/TS3281
iPad: Basic troubleshooting
http://support.apple.com/kb/TS3274
Cheers, Tom -
Trying to download itunes on new computer and it says thank you for downloading but nothing happened
trying to download itunes on new computer and it says thank you for downloading but nothing happened
Clear your broswer's cache and then try again.
-
My ipad just won't let me sign in with my apple password on FaceTime or iMessage since updating to ios7 it says check my network connection, even though my iPhone works fine with the same password, can anybody help please, I have tried numerous things but nothing works. Will I have to wait for a bug fix to sort this? I hear they are working on one a the minute, I hate ios7
Try a Restart.
Press and hold the Sleep/Wake button for a few seconds until the red "slide to power off" slider appears, and then slide the slider. Press and hold the Sleep/Wake button until the Apple logo appears.
Resetting your settings
You can also try resetting all settings. Settings>General>Reset>Reset All Settings. You will have to enter all of your device settings again.... All of the settings in the settings app will have to be re-entered. You won't lose any data, but it takes time to enter all of the settings again.
Resetting your device
Press and hold the Sleep/Wake button and the Home button together for at least ten seconds, until the Apple logo appears. Apple recommends this only if you are unable to restart it.
Or if this doesn't work and nobody else on the blog doesn't have a better idea you can contact Apple.
Here is a link to their contacts with most of the information below.
http://www.apple.com/contact/ -
HELP NEEDED!! I bought a brand new mac air 11 inch a month ago, and for three days now I can't switch it on.when I do, i can hear the machine is on, but nothing else happens. (yes it is charged). please help.
I bought it in South Africa and I am currently in Israel.thank you for the response.its not working, tried that. i can switch the machine on and off, can hear the machine when i hold it to my ear. but nothing works, not the screen, not the sound, nothing.
-
I bought some songs off of itunes and the songs synced onto my ipod CLASSIC but they didnt sync into my ipod TOUCH. I have tried authorizing and deauthorizing my laptop, updating softwares but nothing works. Anyone know why this is happening?!?!?!
Hi,
The songs need to be in the playlist(s) that go onto the ipod touch.
Plug the ipod touch into the computer and go to the music section of it from the devices menu. From here make sure that the playlist(s) that go on to this ipod are the ones that have the new songs.
Once this is done, click sync/apply.
I hope this helps. -
i am literally fuming over this.
First off. i purchased an album for preorder when i didnt have money in my account.
now i have money in my account and it wont fricking download. ive tried turning on automatic pre orders i've signed in and out ive done all that crap and it still just says purchased.
second, i can't download ANYTHING to itunes. i JUST purchased two new songs and it will not download them to itunes. i keep clicking on the little fricking cloud button but nothing happens. if itunes just took my money and wont give me my songs i am going to freak out someone please help meAre you logged into her iTunes account using her Apple ID on the iPad? Settings>Store>Apple ID?
If you are, you could try restarting the iPad and try again, maybe that will reset everything - and maybe it won't. But, if you continue to get the message about contacting support, there may be a red flag that came up somewhere along the line - and the only way to resolve it may be to contact iTunes Support. -
I followed all the directions to get Firefox 8 to work with my Norton 360, but nothing has worked. Is there anything else I can do? I didn't know there was an issue when I first upgraded to Firefox 8 so didn't choose the Norton plug ins immediately so I uninstalled Firefox hoping to be able to do it correctly when I Downloaded it again. Unfortunately it didn't ask me any thing regarding Norton so I went to Plug ins as directed to Enable Norton 360's plug ins, but none were listed.
What can I do now? I LOVE Firefox! If we can't make it work I'll be stuck with Internet Explorer which I do not care for at all!
I need to have Norton Security to protect my computer. Please help me find a solution to this problem ASAP.
Thank you,
Susan L Woods
[email protected]Hi Susie, I use Norton 360 and have the latest Firefox 8 installed is working fine for me. Firefox 8 support for [http://community.norton.com/t5/Norton-360/Firefox-8-Support-for-Norton-Toolbar/td-p/581640 Norton Toolbar] was released on Nov 8th. Install the appropriate add-ons based on the version of Norton 360 you're using (see official Norton link above). Hope this helps.
-
My itunes account doesn't list "devices" above the playlist, as the syncing instructions give. How can I sync the itunes I have purchased & downloaded to my computer, to my ipod shuffle? The device is plugged into my computer, but nothing happens. Shouldn't the computer recognize the device? It doesn't. Please help!
As a test, shut down your computer and disconnect ALL USB devices. Do this procedure to Reset the shuffle
http://support.apple.com/kb/HT1655
Start up computer with nothing connected, except for standard keyboard and mouse (if it's not a laptop). Run iTunes. Connect shuffle to a direct USB port on the computer. See if there's any improvement,
If the shuffle is now recognized, there may have been a USB device conflict previously, or maybe all of the devices connected at the same time overloads the USB bus (for power). An iPod charges its battery while connected, so it is a high-power USB device. -
When I go to plug in my iPhone 5 to my PC it will charge my phone but it doesn't show up that it's connected to my computer or in iTunes. I have tried just about everything that I can find in the support discussions but nothing has worked. Any other suggestions?
If you have carefully follow ALL of the steps in that article, you are using a USB port directly on your computer and not a USB hub (don't use a front port on a tower or desktop either, as they are an internal hub) and you installed iTunes correctly using an Administrator ID and you have tried disabling your antivirus and firewall then there is no hope of it ever working. Look at the tip again, and go through it carefully, not skipping any steps.
Note, BTW, that an iPhone will not show up on a computer, only in iTunes. If there are photos in the Camera Roll then it will appear in Windows as a digital camera only.
Maybe you are looking for
-
Going from one table view to another
Hey there, I am new to creating apps and have a minor problem. I have my table view controller attached to my nav bar and it displays data from an array and has a detail disclosure indicator for 3 rows. I don't know what code to put in the prepare fo
-
I'm using elements 7 on windows vista. 2gb ram, system is 160gb with 62.6 free. I keep all my element files on an external hard drive. Recently started hanging up in between commands. For example; go into organizer, choose a file to open and takes
-
HELP !!! JTextArea in a JDialog !!!
I have a JTextArea in a Dialog but there is no scrollbars !!! How can i create a scrollbar, please help !!!
-
Scrollable frame not working, why?
I did exactly what is instructed, grab the images and text and group them, create a frame then paste into that frame. Once I do all that the scrollable option is still greyed out, Why? someone help please!! thank you. PS- I have CC and have the lates
-
I'd appreciate any help.