Click here to Skip to main content
15,867,308 members
Home / Discussions / Objective-C and Swift
   

Objective-C and Swift

 
QuestionIn objective-c I’m try to create a statement that toggles a variable Pin
Member 1125124020-Nov-14 11:02
Member 1125124020-Nov-14 11:02 
AnswerRe: In objective-c I’m try to create a statement that toggles a variable Pin
Richard MacCutchan20-Nov-14 21:56
mveRichard MacCutchan20-Nov-14 21:56 
QuestionDifference between C and Objective-C Pin
online visit9-Jun-14 19:32
online visit9-Jun-14 19:32 
AnswerRe: Difference between C and Objective-C Pin
future20159-Jun-14 20:57
future20159-Jun-14 20:57 
GeneralRe: Difference between C and Objective-C Pin
online visit9-Jun-14 21:31
online visit9-Jun-14 21:31 
AnswerRe: Difference between C and Objective-C Pin
Richard MacCutchan9-Jun-14 21:00
mveRichard MacCutchan9-Jun-14 21:00 
GeneralRe: Difference between C and Objective-C Pin
thatraja10-Jun-14 21:11
professionalthatraja10-Jun-14 21:11 
GeneralRe: Difference between C and Objective-C Pin
Richard MacCutchan10-Jun-14 21:28
mveRichard MacCutchan10-Jun-14 21:28 
GeneralRe: Difference between C and Objective-C Pin
thatraja10-Jun-14 21:42
professionalthatraja10-Jun-14 21:42 
GeneralRe: Difference between C and Objective-C Pin
Dennis E White11-Jun-14 4:24
professionalDennis E White11-Jun-14 4:24 
GeneralRe: Difference between C and Objective-C Pin
Richard MacCutchan11-Jun-14 5:53
mveRichard MacCutchan11-Jun-14 5:53 
AnswerRe: Difference between C and Objective-C Pin
Dennis E White11-Jun-14 4:22
professionalDennis E White11-Jun-14 4:22 
GeneralRe: Difference between C and Objective-C Pin
Manikandan1011-Jun-14 17:31
professionalManikandan1011-Jun-14 17:31 
QuestionUIWebView Scroll delegate Pin
Erdinc2720-May-14 22:17
Erdinc2720-May-14 22:17 
AnswerRe: UIWebView Scroll delegate Pin
Dennis E White21-May-14 4:38
professionalDennis E White21-May-14 4:38 
GeneralRe: UIWebView Scroll delegate Pin
Erdinc2721-May-14 4:48
Erdinc2721-May-14 4:48 
i think i found the solution. The commented UIview animation block locked the main thread i think that is why Scroll View couldnt response to the new touches. but with this new animation block it works well.

Objective-C
- (void) scrollViewDidScroll:(UIScrollView *)scrollView
{
    
    if (self.lastContentOffset > scrollView.contentOffset.y)
    {
        if (self.altView.frame.size.height + self.altView.frame.origin.y > self.screenHeight)
        {
//            [UIView animateWithDuration:0.5f animations:^{
//                self.altView.frame = CGRectMake(0, self.altView.frame.origin.y-1, 320, 48);
//                self.tarayici.frame = CGRectMake(0, self.tarayici.frame.origin.y, 320, self.tarayici.frame.size.height-1);
//            }];
            
            [UIView animateWithDuration:0.5f delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
                self.altView.frame = CGRectMake(0, self.altView.frame.origin.y-1, 320, 48);
                self.tarayici.frame = CGRectMake(0, self.tarayici.frame.origin.y, 320, self.tarayici.frame.size.height-1);
            } completion:^(BOOL finished) {
                
            }];
        }
        
    }
    else if (self.lastContentOffset < scrollView.contentOffset.y)
    {
        if (self.altView.frame.origin.y < self.screenHeight)
        {
//            [UIView animateWithDuration:0.5f animations:^{
//                self.altView.frame = CGRectMake(0, self.altView.frame.origin.y + 1, 320, 48);
//                self.tarayici.frame = CGRectMake(0, self.tarayici.frame.origin.y, 320, self.tarayici.frame.size.height+1);
//            }];
            [UIView animateWithDuration:0.5f delay:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
                self.altView.frame = CGRectMake(0, self.altView.frame.origin.y + 1, 320, 48);
                self.tarayici.frame = CGRectMake(0, self.tarayici.frame.origin.y, 320, self.tarayici.frame.size.height+1);
            } completion:^(BOOL finished) {
                
            }];
        }
    }
    
    self.lastContentOffset = scrollView.contentOffset.y;

}

vemedya.com


modified 22-May-14 4:15am.

QuestionRegarding objective-c's IDE and working OS?! Pin
Amr Bakri14-Apr-14 13:35
Amr Bakri14-Apr-14 13:35 
AnswerRe: Regarding objective-c's IDE and working OS?! Pin
Richard MacCutchan14-Apr-14 21:54
mveRichard MacCutchan14-Apr-14 21:54 
AnswerRe: Regarding objective-c's IDE and working OS?! Pin
Dennis E White15-Apr-14 5:00
professionalDennis E White15-Apr-14 5:00 
AnswerRe: Regarding objective-c's IDE and working OS?! Pin
future201510-Jun-14 3:50
future201510-Jun-14 3:50 
AnswerRe: Regarding objective-c's IDE and working OS?! Pin
KarstenK29-Sep-14 7:38
mveKarstenK29-Sep-14 7:38 
QuestionIs it possible Java App developed on Net Bean that can Translate into Objective C for IOS Pin
Member 103822404-Mar-14 9:06
Member 103822404-Mar-14 9:06 
SuggestionRe: Is it possible Java App developed on Net Bean that can Translate into Objective C for IOS Pin
Richard MacCutchan4-Mar-14 22:33
mveRichard MacCutchan4-Mar-14 22:33 
QuestionOSX Desktop Manager (Quartz Compositor) Pin
Member 1060876119-Feb-14 0:57
Member 1060876119-Feb-14 0:57 
AnswerRe: OSX Desktop Manager (Quartz Compositor) Pin
Richard MacCutchan19-Feb-14 3:03
mveRichard MacCutchan19-Feb-14 3:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.