Controlling iOS scrolling

2012-01-09 Thread Ken Tabb

Morning folks  Happy New Year,

I've got an iOS app that needs to have a UIScrollView containing a  
horizontal row of UIImageViews, all the same size. The UIScrollView  
will be a subclass as I need it to implement some additional  
behaviour, but I've got 2 questions which may already be built in (but  
I can't find anything relating to it):


[1] Is there an easy way of looping the scrolling (so that you don't  
hit either end of scrolling, you keep going around and around)?


[2] Is there any way to, upon decelerating, ensure that one of the  
imageviews is always centred in the scrollview? Ideally with swish  
decelerating taking place, looking like the user lined it up perfectly  
each time the scrolling comes to rest.


Thanks in advance for any pointers,
Ken

- - - - - - - - - -
Dr. Ken Tabb
Mac, iOS  UNIX Developer - Health  Human Sciences
Machine Vision  Neural Network researcher - School of Computer Science
University of Hertfordshire, UK



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Controlling iOS scrolling

2012-01-09 Thread Conrad Shultz
Take a look at the WWDC videos from either 2010 or 2011... Advanced Scroll 
View Techniques I think was the title. These topics are covered in some depth. 

You will likely also want to examine UIScrollView's -pagingEnabled property as 
relates to your second question. 

(Sent from my iPhone.)

--
Conrad Shultz
Synthetiq Solutions

On Jan 9, 2012, at 1:09, Ken Tabb k.j.t...@herts.ac.uk wrote:

 Morning folks  Happy New Year,
 
 I've got an iOS app that needs to have a UIScrollView containing a horizontal 
 row of UIImageViews, all the same size. The UIScrollView will be a subclass 
 as I need it to implement some additional behaviour, but I've got 2 questions 
 which may already be built in (but I can't find anything relating to it):
 
 [1] Is there an easy way of looping the scrolling (so that you don't hit 
 either end of scrolling, you keep going around and around)?
 
 [2] Is there any way to, upon decelerating, ensure that one of the imageviews 
 is always centred in the scrollview? Ideally with swish decelerating taking 
 place, looking like the user lined it up perfectly each time the scrolling 
 comes to rest.
 
 Thanks in advance for any pointers,
 Ken
 
 - - - - - - - - - -
 Dr. Ken Tabb
 Mac, iOS  UNIX Developer - Health  Human Sciences
 Machine Vision  Neural Network researcher - School of Computer Science
 University of Hertfordshire, UK
 
 
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/conrad%40synthetiqsolutions.com
 
 This email sent to con...@synthetiqsolutions.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Does NSOpenGLView override -isOpaque?

2012-01-09 Thread Corbin Dunn

On Jan 6, 2012, at 11:57 AM, vincent habchi wrote:

 Corbin,
 
 Yes, NSOpenGLView has:
 
 - (BOOL)isOpaque {
   return YES;
 }
 
 Thanks for your answer!
 
 Could the documentation then mention than when an NSOpenGLView occupies the 
 whole frame of its parent window, and when its context is set to draw under, 
 one should override -isOpaque to return NO, otherwise nothing gets drawn?

Hi Vincent,
Yes, we can improve the docs! Can you log a bug on bugreporter.apple.com asking 
for it to be improved? that is the best way to get this updated.

thanks,
corbin

 
 Thanks again, have a nice day!
 Vincent

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


music.read-only sandbox entitlement doesn't seem to work

2012-01-09 Thread Michael Crawford
I'm converting over a legacy Core-Audio application to run sandboxed.  This app 
normally access files in the iTunes library in order to analyze them for BPM 
information.  Enabling the music.read-only entitlement does not work.

com.apple.security.assets.music.read-only

I get the following error:

deny file-read-data /Users/smj/Music/iTunes/iTunes Music/Depeche 
Mode/Violator/01 World In My Eyes.mp3

I have been able to overcome this problem by adding the temporary exception to 
perform relative reads from the users home directory using this path:

/Music/iTunes/iTunes Music/

My issue with this solution is that it is temporary!  Can anyone shed light on 
why the music entitlement is not working?  As I indicated I'm using Core Audio 
APIs.  Do I need to switch to AVAsset or something like this to make this work? 
 Some other little detail I'm leaving out?
 
One other thought that just occurred to me is that I'm using the paths I get 
from iTunes to try and access these files.  These paths are absolute from the 
root directory and look something like this:

Unable to open track 
file://localhost/Users/michael/Music/iTunes/iTunes%20Music/Depeche%20Mode/Violator/01%20World%20In%20My%20Eyes.mp3
 (File not found)

Do I need to specify some sort of relative substitute when using 
*.music.read-only?

-Michael
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Core Data ignoring validation constraint

2012-01-09 Thread Tom Harrington
I have a data model where one of the string attributes has both a min
and max length validation requirement. At run time though, only the
max length constraint seems to exist. Violating the min length
constraint doesn't cause validation failures, whether using
-validateForInsert: or -validateValue:forKey:error: For example:

NSString *tooShortName = @a;
NSError *validationError = nil;
[category validateValue:tooShortName forKey:@name 
error:validationError];

At this point validationError is still nil. Continuing:

[category setValue:tooShortName forKey:@name];
[category validateForInsert:validationError];

...still nil.

I suspected that the data model GUI might be lying to me so I looked
at the model file directly (glad it's XML) and found this for the
attribute:

attribute name=name attributeType=String minValueString=10
maxValueString=100 syncable=YES/

So, both constraints are in the model file. They don't both get loaded
at run time though:

(gdb) po category entity] attributesByName] objectForKey:@name]
validationPredicates]
__NSArrayM 0x897bcd0(
length = 100
)

I tried creating a new project to test this and got the same thing
immediately. Is there some additional step I've missed?

I'm using Xcode 4.2.1 on Mac OS X 10.7.2; results are the same in the
simulator and on an iPhone 4s running iOS 5.0.1.

-- 
Tom Harrington
atomicb...@gmail.com
AIM: atomicbird1
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: music.read-only sandbox entitlement doesn't seem to work

2012-01-09 Thread Michael Nickerson

On Jan 09, 2012, at 12:52 PM, Michael Crawford wrote:

 I'm converting over a legacy Core-Audio application to run sandboxed.  This 
 app normally access files in the iTunes library in order to analyze them for 
 BPM information.  Enabling the music.read-only entitlement does not work.
 
   com.apple.security.assets.music.read-only
 
 I get the following error:
 
   deny file-read-data /Users/smj/Music/iTunes/iTunes Music/Depeche 
 Mode/Violator/01 World In My Eyes.mp3
 
 I have been able to overcome this problem by adding the temporary exception 
 to perform relative reads from the users home directory using this path:
 
   /Music/iTunes/iTunes Music/
 


I don't have a solution for you, but I wanted to point out that even using 
temporary exceptions won't work for everyone - you can change iTune's music 
library to some other path within iTunes.

 
--
Darkshadow
(aka Michael Nickerson)
http://www.nightproductions.net


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Maintaining Image for a UIButton

2012-01-09 Thread R
This is easy in OSX and bindings.  But how do I maintain the aspect
ratio of an UIImage place in a UIButton... via [myButton setImage...]
or [myButton setBackgroundImage...].

In IB, there is a setting for Aspect Ratio in the View settings but it
seems to make zero difference.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Issue in iTunes COM for Windows SDK with iOS5

2012-01-09 Thread Payal Mundhada
Hi All,

This is regarding iTunes COM for Windows SDK. This may not be the proper place 
to post this question, but there doesn’t seem to be a list for the same.

I am trying to transfer audio files to iPhone through iTunes SDK
Following is the code snippet which I am using to transfer the file

IITUserPlaylist upl = (IITUserPlaylist)playListSorce;
IITOperationStatus status = upl.AddFile(track);
while (status.InProgress)
{
Thread.Sleep(100);
}
IITTrackCollection tracksList = upl.Tracks;
tracksList[trackCount].Album = playListSorce.Namehttp://playListSorce.Name/;

When the file sync is in progress then Status.InProgress returns true for all 
non IOS 5 devices, however for devices having IOS5  on it status.InProgress 
returns false even if the file is in sync.
tracksList[trackCount].Album = playListSorce.Namehttp://playListSorce.Name/ 
this statement thorws an exception if file sync is in progress. As in case of 
IOS 5 devices status.InProgress retruns false , functionality is not working as 
expected. Does any one know the solution to resolve this issue?

Any help will be greatly appreciated . Please let me know the mailing list 
where this question can be posted?


Thanks  Regards,
Payal







DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Persistent Systems Ltd. It is intended only for the use of the 
individual or entity to which it is addressed. If you are not the intended 
recipient, you are not authorized to read, retain, copy, print, distribute or 
use this message. If you have received this communication in error, please 
notify the sender and delete all copies of this message. Persistent Systems 
Ltd. does not accept any liability for virus infected mails.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com