iOS 5.1 Simulator
  [ Ignoră ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10

imi crapa aparent fara motiv in Simulator cand apelez metoda

[UIView animateWithDuration:<#(NSTimeInterval)#> delay:<#(NSTimeInterval)#> options:<#(UIViewAnimationOptions)#> animations:<#^(void)animations#> completion:<#^(BOOL finished)completion#>];

ati patit vreunul dintre voi asa ceva? pe device imi ruleaza fara probleme..
am incercat cu NSZombies, pentru ca-mi returneaza EXC_BAD_ACCESS dar nu prinde nici un Zombie. sa fie problema de framework!?

 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil
 
  [ Ignoră ]   [ # 1 ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10

mai exact primesc urmatoarele:

Thread 1: EXC_BAD_ACCESS (code=2, address=0x0)

 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil
 
  [ Ignoră ]   [ # 2 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

EXC_BAD_ACCESS asta presupune,sigur e vreo eroare undeva in cod, poate in block-urile animations sau completion.
Block-ul sti ca se poate executa si mai tarziu, nu imediat, eu de ex imi crapa intr-un block din cauza unui delegate callback care nu era trecut nil in dealloc.
Block-ul copiaza toate elementele mai putin variabile mutabile, de ex daca ai un NSMUtableArray ce il folosesti in block trebuie sa apelezi tu retain, altfel vei avea probleme. Daca e Array normal retainCount-ul este incrementat de block automat.

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 3 ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10

m-am gandit si eu ca se poate sa fie de la block-uri da’ am incercat un apel simplu fara cod in blockuri si tot asa face! :|

 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil
 
  [ Ignoră ]   [ # 4 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

Pune nslog si atat, din documentatie:

“animations
A block object containing the changes to commit to the views. This is where you programmatically change any animatable properties of the views in your view hierarchy. This block takes no parameters and has no return value. This parameter must not be NULL.”

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 5 ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10

^(void) {}
si
^(BOOL finished) {}

si cu NSLog crapa! dafuq is happening?! :(

 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil
 
  [ Ignoră ]   [ # 6 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

Eu tocmai am creat un proiect nou si am apelat metoda,merge ok.

[UIView animateWithDuration2 delay0 optionsUIViewAnimationOptionRepeat animations: ^{
        self
.imgView.frame CGRectMake(85275150132);
    
} completionnil]
 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 7 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

Pune si codul aici, poate ajuta.

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 8 ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10
NSLog(@"animateLogo");
    
    
[UIView animateWithDuration:.35 
                          delay
:
                        options
:UIViewAnimationCurveEaseIn 
                     animations
:^(void){
                     
                         NSLog
(@"1st animation finished!");
                     

                     completion
:^(BOOL finished){
                     
                         NSLog
(@"2nd animation finished!");
                     
}]
 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil
 
  [ Ignoră ]   [ # 9 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

E tare ciudat, la mine merge.

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 10 ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10

pe device imi merge si mie, insa pe simulator nu. sunt curios care-ar putea fi problema!

 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil
 
  [ Ignoră ]   [ # 11 ]
Avatar
RankRankRankRank
Sr. Member
Din: Bucuresti
Macuser din: 22.09.06

Ia deschide cu shift+command+g din finder “go to folder” si merge aici: ~/Library/Application Support/iPhone Simulator
Sterge tot ce e acolo si din xCode product (tii alt apasat) si selectezi “clean build folder”

 Semnătură 

A man should look for what is, and not for what he thinks should be.—Albert Einstein

Profil
 
  [ Ignoră ]   [ # 12 ]
RankRank
Jr. Member
Din: Bucuresti
Macuser din: 26.03.10

am incercat, tot la fel face! :(

 Semnătură 

 iPhone 5 16GB black, iOS 7 beta 5
 MacBook Pro 15” Unibody, Late 2011 2,4 Ghz Intel Core i7, 8GB RAM, 128GB SSD, Radeon 6770 1GB, HiRes Display, OS X 10.8.3
 Thunderbolt Display

Profil