This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
defined('UPLOAD_PATH') || define('UPLOAD_PATH', 'path_to_wp-content_uploads'); | |
$url = 'image_URL'; //Image url like http://www.site.com/wp-content/uploads/year/month/image.jpg | |
$parts = array_slice(explode('/', $url), -3); | |
$imagePath = UPLOAD_PATH . implode(DIRECTORY_SEPARATOR, $parts); | |
if(file_exists($imagePath)) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Passo 1: Criar algumas variaveis uteis. | |
int screenWidth = self.view.bounds.size.width; //Largura da tela | |
int screenHeight = self.view.bounds.size.height;//Altura da Tela | |
int numberOfViews = 3; //Quantidade de views | |
//Passo 1: Criar o ScrollView | |
UIScrollView *scrollView = [[UIScrollView alloc]initWithFrame: CGRectMake(0, 0, screenWidth, screenHeight)]; | |
//Passo 2: Um loop para criar as views | |
for (int i=0; i<numberOfViews;i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[scrollView setPagingEnabled:YES]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (BOOL)canBecomeFirstResponder { | |
return YES; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)viewDidAppear:(BOOL)animated { | |
[self becomeFirstResponder]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { | |
UITouch *touch = [[event allTouches] anyObject]; | |
//Verifique se o seu textField está com o teclado aberto e se o toque foi fora dele. | |
if ([myTextField isFirstResponder] && [touch view] != myTextField) { | |
[myTextField resignFirstResponder]; | |
} | |
[super touchesBegan:touches withEvent:event]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function indexAction(){ | |
$this->_helper->layout()->disableLayout(); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function indexAction(){ | |
$this->_helper->layout()->setLayout('novo_layout'); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function indexAction(){ | |
$this->_helper->viewRenderer->setNoRender(true); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function indexAction(){ | |
$this->_helper->viewRenderer('VIEW QUE DESEJA RENDERIZAR', null, true); | |
} | |
?> |
OlderNewer